lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index FieldsReader.java
Date Wed, 01 Sep 2004 20:04:13 GMT
dnaber      2004/09/01 13:04:13

  Modified:    src/java/org/apache/lucene/index FieldsReader.java
  Log:
  stop using the deprecated Field constructor
  
  Revision  Changes    Path
  1.8       +11 -4     jakarta-lucene/src/java/org/apache/lucene/index/FieldsReader.java
  
  Index: FieldsReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/FieldsReader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FieldsReader.java	29 Mar 2004 22:48:02 -0000	1.7
  +++ FieldsReader.java	1 Sep 2004 20:04:12 -0000	1.8
  @@ -67,11 +67,18 @@
   
         byte bits = fieldsStream.readByte();
   
  +      Field.Index index;
  +      boolean tokenize = (bits & 1) != 0;
  +      if (fi.isIndexed && tokenize)
  +        index = Field.Index.TOKENIZED;
  +      else if (fi.isIndexed && !tokenize)
  +        index = Field.Index.UN_TOKENIZED;
  +      else
  +        index = Field.Index.NO;
         doc.add(new Field(fi.name,		  // name
   			fieldsStream.readString(), // read value
  -			true,			  // stored
  -			fi.isIndexed,		  // indexed
  -			(bits & 1) != 0, fi.storeTermVector)); // vector
  +			Field.Store.YES, index,
  +			fi.storeTermVector ? Field.TermVector.YES : Field.TermVector.NO));
       }
   
       return doc;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message