lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1146172 - /lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java
Date Wed, 13 Jul 2011 18:03:05 GMT
Author: mikemccand
Date: Wed Jul 13 18:03:05 2011
New Revision: 1146172

URL: http://svn.apache.org/viewvc?rev=1146172&view=rev
Log:
LUCENE-2308: more test cutover

Modified:
    lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java

Modified: lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java?rev=1146172&r1=1146171&r2=1146172&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java
(original)
+++ lucene/dev/branches/fieldtype/lucene/src/test/org/apache/lucene/index/TestFieldsReader.java
Wed Jul 13 18:03:05 2011
@@ -520,8 +520,8 @@ public class TestFieldsReader extends Lu
     final Number[] answers = new Number[numDocs];
     final NumericField.DataType[] typeAnswers = new NumericField.DataType[numDocs];
     for(int id=0;id<numDocs;id++) {
-      Document doc = new Document();
-      NumericField nf = new NumericField("nf", Field.Store.YES, false);
+      org.apache.lucene.document2.Document doc = new org.apache.lucene.document2.Document();
+      org.apache.lucene.document2.NumericField nf = new org.apache.lucene.document2.NumericField("nf",
org.apache.lucene.document2.NumericField.TYPE_STORED);
       doc.add(nf);
       final Number answer;
       final NumericField.DataType typeAnswer;
@@ -554,8 +554,7 @@ public class TestFieldsReader extends Lu
       }
       answers[id] = answer;
       typeAnswers[id] = typeAnswer;
-      // nocommit need to cutover
-      doc.add(new NumericField("id", Integer.MAX_VALUE, Field.Store.NO, true).setIntValue(id));
+      doc.add(new org.apache.lucene.document2.NumericField("id", Integer.MAX_VALUE).setIntValue(id));
       w.addDocument(doc);
     }
     final IndexReader r = w.getReader();



Mime
View raw message