You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by ot...@apache.org on 2002/04/30 17:08:10 UTC

cvs commit: jakarta-lucene/src/java/org/apache/lucene/index FieldInfos.java

otis        02/04/30 08:08:10

  Modified:    src/java/org/apache/lucene/index FieldInfos.java
  Log:
  - A patch to FieldInfos.java that Doug Cutting suggested at:
    http://marc.theaimsgroup.com/?l=lucene-user&m=100253044509125&w=2
    This allows co-existence of indexed and non-indexed fields with the same name.
  Submitted by:	Guido Casper
  Reviewed by:	otis
  
  Revision  Changes    Path
  1.3       +2 -4      jakarta-lucene/src/java/org/apache/lucene/index/FieldInfos.java
  
  Index: FieldInfos.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/FieldInfos.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FieldInfos.java	1 Nov 2001 01:13:00 -0000	1.2
  +++ FieldInfos.java	30 Apr 2002 15:08:10 -0000	1.3
  @@ -105,10 +105,8 @@
       if (fi == null)
         addInternal(name, isIndexed);
       else if (fi.isIndexed != isIndexed)
  -      throw new IllegalStateException("field " + name +
  -				      (fi.isIndexed ? " must" : " cannot") +
  -				      " be an indexed field.");
  -  }
  +      fi.isIndexed = true;
  +   }
   
     private final void addInternal(String name, boolean isIndexed) {
       FieldInfo fi = new FieldInfo(name, isIndexed, byNumber.size());
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>