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 TestFilterIndexReader.java TestFieldInfos.java TestSegmentTermEnum.java TestIndexWriter.java TestSegmentTermDocs.java TestIndexReader.java
Date Sun, 10 Oct 2004 15:58:32 GMT
dnaber      2004/10/10 08:58:32

  Modified:    src/test/org/apache/lucene/index TestFilterIndexReader.java
                        TestFieldInfos.java TestSegmentTermEnum.java
                        TestIndexWriter.java TestSegmentTermDocs.java
                        TestIndexReader.java
  Log:
  use the non-deprecated API, no functional change
  
  Revision  Changes    Path
  1.9       +3 -3      jakarta-lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java
  
  Index: TestFilterIndexReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestFilterIndexReader.java	10 Oct 2004 15:43:39 -0000	1.8
  +++ TestFilterIndexReader.java	10 Oct 2004 15:58:32 -0000	1.9
  @@ -95,15 +95,15 @@
         new IndexWriter(directory, new WhitespaceAnalyzer(), true);
   
       Document d1 = new Document();
  -    d1.add(Field.Text("default","one two"));
  +    d1.add(new Field("default","one two", Field.Store.YES, Field.Index.TOKENIZED));
       writer.addDocument(d1);
   
       Document d2 = new Document();
  -    d2.add(Field.Text("default","one three"));
  +    d2.add(new Field("default","one three", Field.Store.YES, Field.Index.TOKENIZED));
       writer.addDocument(d2);
   
       Document d3 = new Document();
  -    d3.add(Field.Text("default","two four"));
  +    d3.add(new Field("default","two four", Field.Store.YES, Field.Index.TOKENIZED));
       writer.addDocument(d3);
   
       writer.close();
  
  
  
  1.4       +1 -1      jakarta-lucene/src/test/org/apache/lucene/index/TestFieldInfos.java
  
  Index: TestFieldInfos.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestFieldInfos.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestFieldInfos.java	28 Sep 2004 18:15:52 -0000	1.3
  +++ TestFieldInfos.java	10 Oct 2004 15:58:32 -0000	1.4
  @@ -25,7 +25,7 @@
     protected void tearDown() {
     }
   
  -  public void test() throws IOException {
  +  public void test() {
       //Positive test of FieldInfos
       assertTrue(testDoc != null);
       FieldInfos fieldInfos = new FieldInfos();
  
  
  
  1.3       +1 -1      jakarta-lucene/src/test/org/apache/lucene/index/TestSegmentTermEnum.java
  
  Index: TestSegmentTermEnum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestSegmentTermEnum.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestSegmentTermEnum.java	14 Jun 2004 00:16:05 -0000	1.2
  +++ TestSegmentTermEnum.java	10 Oct 2004 15:58:32 -0000	1.3
  @@ -98,7 +98,7 @@
     private void addDoc(IndexWriter writer, String value)
     {
       Document doc = new Document();
  -    doc.add(Field.UnStored("content", value));
  +    doc.add(new Field("content", value, Field.Store.NO, Field.Index.TOKENIZED));
   
       try {
         writer.addDocument(doc);
  
  
  
  1.4       +2 -2      jakarta-lucene/src/test/org/apache/lucene/index/TestIndexWriter.java
  
  Index: TestIndexWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestIndexWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestIndexWriter.java	13 Oct 2003 14:31:38 -0000	1.3
  +++ TestIndexWriter.java	10 Oct 2004 15:58:32 -0000	1.4
  @@ -74,7 +74,7 @@
       private void addDoc(IndexWriter writer)
       {
           Document doc = new Document();
  -        doc.add(Field.UnStored("content", "aaa"));
  +        doc.add(new Field("content", "aaa", Field.Store.NO, Field.Index.TOKENIZED));
   
           try {
               writer.addDocument(doc);
  
  
  
  1.6       +1 -1      jakarta-lucene/src/test/org/apache/lucene/index/TestSegmentTermDocs.java
  
  Index: TestSegmentTermDocs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestSegmentTermDocs.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestSegmentTermDocs.java	22 Sep 2004 18:32:27 -0000	1.5
  +++ TestSegmentTermDocs.java	10 Oct 2004 15:58:32 -0000	1.6
  @@ -226,7 +226,7 @@
     private void addDoc(IndexWriter writer, String value) throws IOException
     {
         Document doc = new Document();
  -      doc.add(Field.UnStored("content", value));
  +      doc.add(new Field("content", value, Field.Store.NO, Field.Index.TOKENIZED));
         writer.addDocument(doc);
     }
   }
  
  
  
  1.9       +9 -9      jakarta-lucene/src/test/org/apache/lucene/index/TestIndexReader.java
  
  Index: TestIndexReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestIndexReader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestIndexReader.java	1 Aug 2004 22:55:12 -0000	1.8
  +++ TestIndexReader.java	10 Oct 2004 15:58:32 -0000	1.9
  @@ -414,27 +414,27 @@
       private void addDocumentWithFields(IndexWriter writer) throws IOException
       {
           Document doc = new Document();
  -        doc.add(Field.Keyword("keyword","test1"));
  -        doc.add(Field.Text("text","test1"));
  -        doc.add(Field.UnIndexed("unindexed","test1"));
  -        doc.add(Field.UnStored("unstored","test1"));
  +        doc.add(new Field("keyword","test1", Field.Store.YES, Field.Index.UN_TOKENIZED));
  +        doc.add(new Field("text","test1", Field.Store.YES, Field.Index.TOKENIZED));
  +        doc.add(new Field("unindexed","test1", Field.Store.YES, Field.Index.NO));
  +        doc.add(new Field("unstored","test1", Field.Store.NO, Field.Index.TOKENIZED));
           writer.addDocument(doc);
       }
   
       private void addDocumentWithDifferentFields(IndexWriter writer) throws IOException
       {
           Document doc = new Document();
  -        doc.add(Field.Keyword("keyword2","test1"));
  -        doc.add(Field.Text("text2","test1"));
  -        doc.add(Field.UnIndexed("unindexed2","test1"));
  -        doc.add(Field.UnStored("unstored2","test1"));
  +        doc.add(new Field("keyword2","test1", Field.Store.YES, Field.Index.UN_TOKENIZED));
  +        doc.add(new Field("text2","test1", Field.Store.YES, Field.Index.TOKENIZED));
  +        doc.add(new Field("unindexed2","test1", Field.Store.YES, Field.Index.NO));
  +        doc.add(new Field("unstored2","test1", Field.Store.NO, Field.Index.TOKENIZED));
           writer.addDocument(doc);
       }
   
       private void addDoc(IndexWriter writer, String value)
       {
           Document doc = new Document();
  -        doc.add(Field.UnStored("content", value));
  +        doc.add(new Field("content", value, Field.Store.NO, Field.Index.TOKENIZED));
   
           try
           {
  
  
  

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