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/test/org/apache/lucene/index DocHelper.java
Date Sun, 10 Oct 2004 16:05:36 GMT
dnaber      2004/10/10 09:05:36

  Modified:    src/test/org/apache/lucene/index DocHelper.java
  Log:
  use the non-deprecated API, no functional change
  
  Revision  Changes    Path
  1.3       +12 -6     jakarta-lucene/src/test/org/apache/lucene/index/DocHelper.java
  
  Index: DocHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/DocHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DocHelper.java	5 Oct 2004 17:30:47 -0000	1.2
  +++ DocHelper.java	10 Oct 2004 16:05:36 -0000	1.3
  @@ -28,7 +28,8 @@
   class DocHelper {
     public static final String FIELD_1_TEXT = "field one text";
     public static final String TEXT_FIELD_1_KEY = "textField1";
  -  public static Field textField1 = Field.Text(TEXT_FIELD_1_KEY, FIELD_1_TEXT, false);
  +  public static Field textField1 = new Field(TEXT_FIELD_1_KEY, FIELD_1_TEXT,
  +      Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO);
     
     public static final String FIELD_2_TEXT = "field field field two text";
     //Fields will be lexicographically sorted.  So, the order is: field, text, two
  @@ -38,19 +39,23 @@
     
     public static final String KEYWORD_TEXT = "Keyword";
     public static final String KEYWORD_FIELD_KEY = "keyField";
  -  public static Field keyField = Field.Keyword(KEYWORD_FIELD_KEY, KEYWORD_TEXT);
  +  public static Field keyField = new Field(KEYWORD_FIELD_KEY, KEYWORD_TEXT,
  +      Field.Store.YES, Field.Index.UN_TOKENIZED);
     
     public static final String UNINDEXED_FIELD_TEXT = "unindexed field text";
     public static final String UNINDEXED_FIELD_KEY = "unIndField";
  -  public static Field unIndField = Field.UnIndexed(UNINDEXED_FIELD_KEY, UNINDEXED_FIELD_TEXT);
  +  public static Field unIndField = new Field(UNINDEXED_FIELD_KEY, UNINDEXED_FIELD_TEXT,
  +      Field.Store.YES, Field.Index.NO);
     
     public static final String UNSTORED_1_FIELD_TEXT = "unstored field text";
     public static final String UNSTORED_FIELD_1_KEY = "unStoredField1";
  -  public static Field unStoredField1 = Field.UnStored(UNSTORED_FIELD_1_KEY, UNSTORED_1_FIELD_TEXT,
false);
  +  public static Field unStoredField1 = new Field(UNSTORED_FIELD_1_KEY, UNSTORED_1_FIELD_TEXT,
  +      Field.Store.NO, Field.Index.TOKENIZED, Field.TermVector.NO);
   
     public static final String UNSTORED_2_FIELD_TEXT = "unstored field text";
     public static final String UNSTORED_FIELD_2_KEY = "unStoredField2";
  -  public static Field unStoredField2 = Field.UnStored(UNSTORED_FIELD_2_KEY, UNSTORED_2_FIELD_TEXT,
true);
  +  public static Field unStoredField2 = new Field(UNSTORED_FIELD_2_KEY, UNSTORED_2_FIELD_TEXT,
  +      Field.Store.NO, Field.Index.TOKENIZED, Field.TermVector.YES);
   
   //  public static Set fieldNamesSet = null;
   //  public static Set fieldValuesSet = null;
  @@ -136,6 +141,7 @@
       int result = 0;
       while (fields.hasMoreElements()) {
         String name = fields.nextElement().toString();
  +      name += "";   // avoid compiler warning
         result++;
       }
       return result;
  
  
  

---------------------------------------------------------------------
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