lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r823246 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene: index/ queryParser/ search/ search/spans/
Date Thu, 08 Oct 2009 17:53:52 GMT
Author: buschmi
Date: Thu Oct  8 17:53:52 2009
New Revision: 823246

URL: http://svn.apache.org/viewvc?rev=823246&view=rev
Log:
LUCENE-1961: Remove remaining deprecations from document package.

Modified:
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestFieldsReader.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/queryParser/TestQueryParser.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermRangeFilter.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestSpans.java

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java?rev=823246&r1=823245&r2=823246&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java
Thu Oct  8 17:53:52 2009
@@ -169,7 +169,7 @@
       if (f.isStored()) add(stored,f);
       else add(unstored,f);
       if (f.getOmitNorms()) add(noNorms,f);
-      if (f.getOmitTf()) add(noTf,f);
+      if (f.getOmitTermFreqAndPositions()) add(noTf,f);
       if (f.isLazy()) add(lazy, f);
     }
   }

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestFieldsReader.java?rev=823246&r1=823245&r2=823246&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestFieldsReader.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestFieldsReader.java
Thu Oct  8 17:53:52 2009
@@ -72,7 +72,7 @@
     assertTrue(field.isStoreOffsetWithTermVector() == true);
     assertTrue(field.isStorePositionWithTermVector() == true);
     assertTrue(field.getOmitNorms() == false);
-    assertTrue(field.getOmitTf() == false);
+    assertTrue(field.getOmitTermFreqAndPositions() == false);
 
     field = doc.getField(DocHelper.TEXT_FIELD_3_KEY);
     assertTrue(field != null);
@@ -80,7 +80,7 @@
     assertTrue(field.isStoreOffsetWithTermVector() == false);
     assertTrue(field.isStorePositionWithTermVector() == false);
     assertTrue(field.getOmitNorms() == true);
-    assertTrue(field.getOmitTf() == false);
+    assertTrue(field.getOmitTermFreqAndPositions() == false);
 
     field = doc.getField(DocHelper.NO_TF_KEY);
     assertTrue(field != null);
@@ -88,7 +88,7 @@
     assertTrue(field.isStoreOffsetWithTermVector() == false);
     assertTrue(field.isStorePositionWithTermVector() == false);
     assertTrue(field.getOmitNorms() == false);
-    assertTrue(field.getOmitTf() == true);
+    assertTrue(field.getOmitTermFreqAndPositions() == true);
     reader.close();
   }
 
@@ -134,7 +134,7 @@
     assertTrue("field is null and it shouldn't be", field != null);
     assertTrue("stringValue isn't null for lazy binary field", field.stringValue() == null);
 
-    byte [] bytes = field.binaryValue();
+    byte [] bytes = field.getBinaryValue();
     assertTrue("bytes is null and it shouldn't be", bytes != null);
     assertTrue("", DocHelper.LAZY_FIELD_BINARY_BYTES.length == bytes.length);
     for (int i = 0; i < bytes.length; i++) {
@@ -286,9 +286,9 @@
     assertTrue(f1.isBinary());
     assertTrue(!f3.isBinary());
     assertTrue(fb.isBinary());
-    assertSizeEquals(2*DocHelper.FIELD_1_TEXT.length(), f1.binaryValue());
+    assertSizeEquals(2*DocHelper.FIELD_1_TEXT.length(), f1.getBinaryValue());
     assertEquals(DocHelper.FIELD_3_TEXT, f3.stringValue());
-    assertSizeEquals(DocHelper.LAZY_FIELD_BINARY_BYTES.length, fb.binaryValue());
+    assertSizeEquals(DocHelper.LAZY_FIELD_BINARY_BYTES.length, fb.getBinaryValue());
     
     reader.close();
   }

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/queryParser/TestQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/queryParser/TestQueryParser.java?rev=823246&r1=823245&r2=823246&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/queryParser/TestQueryParser.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/queryParser/TestQueryParser.java
Thu Oct  8 17:53:52 2009
@@ -467,7 +467,7 @@
                                      IndexWriter.MaxFieldLength.LIMITED);
     Document doc = new Document();
     doc.add(new Field("content","\u0633\u0627\u0628", 
-                      Field.Store.YES, Field.Index.UN_TOKENIZED));
+                      Field.Store.YES, Field.Index.NOT_ANALYZED));
     iw.addDocument(doc);
     iw.close();
     IndexSearcher is = new IndexSearcher(ramDir, true);

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java?rev=823246&r1=823245&r2=823246&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
Thu Oct  8 17:53:52 2009
@@ -660,9 +660,9 @@
     for (int docnum = 0 ; docnum < words.length ; ++docnum) {   
       Document doc = new Document();
       doc.add(new Field("content", words[docnum], 
-                        Field.Store.YES, Field.Index.UN_TOKENIZED));
+                        Field.Store.YES, Field.Index.NOT_ANALYZED));
       doc.add(new Field("body", "body",
-                        Field.Store.YES, Field.Index.UN_TOKENIZED));
+                        Field.Store.YES, Field.Index.NOT_ANALYZED));
       writer.addDocument(doc);
     }
     writer.optimize();

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermRangeFilter.java?rev=823246&r1=823245&r2=823246&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermRangeFilter.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestTermRangeFilter.java
Thu Oct  8 17:53:52 2009
@@ -343,9 +343,9 @@
                                              IndexWriter.MaxFieldLength.LIMITED);
         Document doc = new Document();
         doc.add(new Field("content","\u0633\u0627\u0628", 
-                          Field.Store.YES, Field.Index.UN_TOKENIZED));
+                          Field.Store.YES, Field.Index.NOT_ANALYZED));
         doc.add(new Field("body", "body",
-                          Field.Store.YES, Field.Index.UN_TOKENIZED));
+                          Field.Store.YES, Field.Index.NOT_ANALYZED));
         writer.addDocument(doc);
             
         writer.optimize();
@@ -387,9 +387,9 @@
         for (int docnum = 0 ; docnum < words.length ; ++docnum) {   
             Document doc = new Document();
             doc.add(new Field("content", words[docnum], 
-                              Field.Store.YES, Field.Index.UN_TOKENIZED));
+                              Field.Store.YES, Field.Index.NOT_ANALYZED));
             doc.add(new Field("body", "body",
-                              Field.Store.YES, Field.Index.UN_TOKENIZED));
+                              Field.Store.YES, Field.Index.NOT_ANALYZED));
             writer.addDocument(doc);
         }
         writer.optimize();

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestSpans.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestSpans.java?rev=823246&r1=823245&r2=823246&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestSpans.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/spans/TestSpans.java
Thu Oct  8 17:53:52 2009
@@ -421,8 +421,8 @@
   // LUCENE-1404
   private void addDoc(IndexWriter writer, String id, String text) throws IOException {
     final Document doc = new Document();
-    doc.add( new Field("id", id, Field.Store.YES, Field.Index.UN_TOKENIZED) );
-    doc.add( new Field("text", text, Field.Store.YES, Field.Index.TOKENIZED) );
+    doc.add( new Field("id", id, Field.Store.YES, Field.Index.NOT_ANALYZED) );
+    doc.add( new Field("text", text, Field.Store.YES, Field.Index.ANALYZED) );
     writer.addDocument(doc);
   }
 



Mime
View raw message