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 TestSearchForDuplicates.java SearchTestForDuplicates.java TestSearch.java ThreadSafetyTest.java SearchTest.java
Date Mon, 06 Sep 2004 22:29:22 GMT
dnaber      2004/09/06 15:29:22

  Modified:    src/test/org/apache/lucene TestSearchForDuplicates.java
                        SearchTestForDuplicates.java TestSearch.java
                        ThreadSafetyTest.java SearchTest.java
  Log:
  don't call the deprecated Field API
  
  Revision  Changes    Path
  1.4       +3 -3      jakarta-lucene/src/test/org/apache/lucene/TestSearchForDuplicates.java
  
  Index: TestSearchForDuplicates.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/TestSearchForDuplicates.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestSearchForDuplicates.java	29 Mar 2004 22:48:05 -0000	1.3
  +++ TestSearchForDuplicates.java	6 Sep 2004 22:29:22 -0000	1.4
  @@ -91,8 +91,8 @@
   
         for (int j = 0; j < MAX_DOCS; j++) {
           Document d = new Document();
  -        d.add(Field.Text(PRIORITY_FIELD, HIGH_PRIORITY));
  -        d.add(Field.Text(ID_FIELD, Integer.toString(j)));
  +        d.add(new Field(PRIORITY_FIELD, HIGH_PRIORITY, Field.Store.YES, Field.Index.TOKENIZED));
  +        d.add(new Field(ID_FIELD, Integer.toString(j), Field.Store.YES, Field.Index.TOKENIZED));
           writer.addDocument(d);
         }
         writer.close();
  
  
  
  1.7       +2 -2      jakarta-lucene/src/test/org/apache/lucene/SearchTestForDuplicates.java
  
  Index: SearchTestForDuplicates.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/SearchTestForDuplicates.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SearchTestForDuplicates.java	29 Mar 2004 22:48:05 -0000	1.6
  +++ SearchTestForDuplicates.java	6 Sep 2004 22:29:22 -0000	1.7
  @@ -43,8 +43,8 @@
   
         for (int j = 0; j < MAX_DOCS; j++) {
           Document d = new Document();
  -        d.add(Field.Text(PRIORITY_FIELD, HIGH_PRIORITY));
  -        d.add(Field.Text(ID_FIELD, Integer.toString(j)));
  +        d.add(new Field(PRIORITY_FIELD, HIGH_PRIORITY, Field.Store.YES, Field.Index.TOKENIZED));
  +        d.add(new Field(ID_FIELD, Integer.toString(j), Field.Store.YES, Field.Index.TOKENIZED));
           writer.addDocument(d);
         }
         writer.close();
  
  
  
  1.4       +2 -2      jakarta-lucene/src/test/org/apache/lucene/TestSearch.java
  
  Index: TestSearch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/TestSearch.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestSearch.java	29 Mar 2004 22:48:05 -0000	1.3
  +++ TestSearch.java	6 Sep 2004 22:29:22 -0000	1.4
  @@ -91,7 +91,7 @@
         };
         for (int j = 0; j < docs.length; j++) {
           Document d = new Document();
  -        d.add(Field.Text("contents", docs[j]));
  +        d.add(new Field("contents", docs[j], Field.Store.YES, Field.Index.TOKENIZED));
           writer.addDocument(d);
         }
         writer.close();
  
  
  
  1.9       +2 -2      jakarta-lucene/src/test/org/apache/lucene/ThreadSafetyTest.java
  
  Index: ThreadSafetyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/ThreadSafetyTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ThreadSafetyTest.java	29 Mar 2004 22:48:05 -0000	1.8
  +++ ThreadSafetyTest.java	6 Sep 2004 22:29:22 -0000	1.9
  @@ -55,8 +55,8 @@
           for (int i = 0; i < 1024*ITERATIONS; i++) {
             Document d = new Document();
             int n = RANDOM.nextInt();
  -          d.add(Field.Keyword("id", Integer.toString(n)));
  -          d.add(Field.UnStored("contents", English.intToEnglish(n)));
  +          d.add(new Field("id", Integer.toString(n), Field.Store.YES, Field.Index.UN_TOKENIZED));
  +          d.add(new Field("contents", English.intToEnglish(n), Field.Store.NO, Field.Index.TOKENIZED));
             System.out.println("Adding " + n);
             
             // Switch between single and multiple file segments
  
  
  
  1.7       +1 -1      jakarta-lucene/src/test/org/apache/lucene/SearchTest.java
  
  Index: SearchTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/SearchTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SearchTest.java	29 Mar 2004 22:48:05 -0000	1.6
  +++ SearchTest.java	6 Sep 2004 22:29:22 -0000	1.7
  @@ -43,7 +43,7 @@
         };
         for (int j = 0; j < docs.length; j++) {
           Document d = new Document();
  -        d.add(Field.Text("contents", docs[j]));
  +        d.add(new Field("contents", docs[j], Field.Store.YES, Field.Index.TOKENIZED));
           writer.addDocument(d);
         }
         writer.close();
  
  
  

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