lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1348630 [3/7] - in /lucene/dev/trunk: lucene/analysis/common/src/test/org/apache/lucene/analysis/core/ lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/ lucene/analysis/common/src/test/org/apache/lucene/analysis/que...
Date Sun, 10 Jun 2012 17:42:29 GMT
Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java Sun Jun 10 17:42:19 2012
@@ -57,10 +57,10 @@ public class TestIndexWriterExceptions e
     /* private field types */
     /* private field types */
 
-    private static final FieldType custom1 = new FieldType(TextField.TYPE_UNSTORED);
+    private static final FieldType custom1 = new FieldType(TextField.TYPE_NOT_STORED);
     private static final FieldType custom2 = new FieldType();
     private static final FieldType custom3 = new FieldType();
-    private static final FieldType custom4 = new FieldType(StringField.TYPE_UNSTORED);
+    private static final FieldType custom4 = new FieldType(StringField.TYPE_NOT_STORED);
     private static final FieldType custom5 = new FieldType(TextField.TYPE_STORED);
     
     static {
@@ -129,13 +129,13 @@ public class TestIndexWriterExceptions e
 
       final Document doc = new Document();
 
-      doc.add(newField(r, "content1", "aaa bbb ccc ddd", TextField.TYPE_STORED));
+      doc.add(newTextField(r, "content1", "aaa bbb ccc ddd", Field.Store.YES));
       doc.add(newField(r, "content6", "aaa bbb ccc ddd", DocCopyIterator.custom1));
       doc.add(newField(r, "content2", "aaa bbb ccc ddd", DocCopyIterator.custom2));
       doc.add(newField(r, "content3", "aaa bbb ccc ddd", DocCopyIterator.custom3));
 
-      doc.add(newField(r, "content4", "aaa bbb ccc ddd", TextField.TYPE_UNSTORED));
-      doc.add(newField(r, "content5", "aaa bbb ccc ddd", StringField.TYPE_UNSTORED));
+      doc.add(newTextField(r, "content4", "aaa bbb ccc ddd", Field.Store.NO));
+      doc.add(newStringField(r, "content5", "aaa bbb ccc ddd", Field.Store.NO));
 
       doc.add(newField(r, "content7", "aaa bbb ccc ddd", DocCopyIterator.custom4));
 
@@ -356,7 +356,7 @@ public class TestIndexWriterExceptions e
     Directory dir = newDirectory();
     MockIndexWriter2 w = new MockIndexWriter2(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
     Document doc = new Document();
-    doc.add(newField("field", "a field", TextField.TYPE_STORED));
+    doc.add(newTextField("field", "a field", Field.Store.YES));
     w.addDocument(doc);
     w.doFail = true;
     try {
@@ -374,7 +374,7 @@ public class TestIndexWriterExceptions e
     Directory dir = newDirectory();
     MockIndexWriter w = new MockIndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())).setMaxBufferedDocs(2));
     Document doc = new Document();
-    doc.add(newField("field", "a field", TextField.TYPE_STORED));
+    doc.add(newTextField("field", "a field", Field.Store.YES));
     w.addDocument(doc);
 
     Analyzer analyzer = new Analyzer(new Analyzer.PerFieldReuseStrategy()) {
@@ -387,7 +387,7 @@ public class TestIndexWriterExceptions e
     };
 
     Document crashDoc = new Document();
-    crashDoc.add(newField("crash", "do it on token 4", TextField.TYPE_STORED));
+    crashDoc.add(newTextField("crash", "do it on token 4", Field.Store.YES));
     try {
       w.addDocument(crashDoc, analyzer);
       fail("did not hit expected exception");
@@ -428,7 +428,7 @@ public class TestIndexWriterExceptions e
     MockIndexWriter3 w = new MockIndexWriter3(dir, conf);
     w.doFail = true;
     Document doc = new Document();
-    doc.add(newField("field", "a field", TextField.TYPE_STORED));
+    doc.add(newTextField("field", "a field", Field.Store.YES));
     for(int i=0;i<10;i++)
       try {
         w.addDocument(doc);
@@ -477,7 +477,7 @@ public class TestIndexWriterExceptions e
 
     Document doc = new Document();
     String contents = "aa bb cc dd ee ff gg hh ii jj kk";
-    doc.add(newField("content", contents, TextField.TYPE_UNSTORED));
+    doc.add(newTextField("content", contents, Field.Store.NO));
     try {
       writer.addDocument(doc);
       fail("did not hit expected exception");
@@ -486,12 +486,12 @@ public class TestIndexWriterExceptions e
 
     // Make sure we can add another normal document
     doc = new Document();
-    doc.add(newField("content", "aa bb cc dd", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("content", "aa bb cc dd", Field.Store.NO));
     writer.addDocument(doc);
 
     // Make sure we can add another normal document
     doc = new Document();
-    doc.add(newField("content", "aa bb cc dd", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("content", "aa bb cc dd", Field.Store.NO));
     writer.addDocument(doc);
 
     writer.close();
@@ -564,7 +564,7 @@ public class TestIndexWriterExceptions e
     IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())).setMaxBufferedDocs(2));
     Document doc = new Document();
     String contents = "aa bb cc dd ee ff gg hh ii jj kk";
-    doc.add(newField("content", contents, TextField.TYPE_UNSTORED));
+    doc.add(newTextField("content", contents, Field.Store.NO));
     boolean hitError = false;
     for(int i=0;i<200;i++) {
       try {
@@ -816,7 +816,7 @@ public class TestIndexWriterExceptions e
   private void addDoc(IndexWriter writer) throws IOException
   {
       Document doc = new Document();
-      doc.add(newField("content", "aaa", TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "aaa", Field.Store.NO));
       writer.addDocument(doc);
   }
 
@@ -913,7 +913,7 @@ public class TestIndexWriterExceptions e
       IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(
           TEST_VERSION_CURRENT, new MockAnalyzer(random())));
       Document doc = new Document();
-      doc.add(newField("field", "a field", TextField.TYPE_STORED));
+      doc.add(newTextField("field", "a field", Field.Store.YES));
       w.addDocument(doc);
       dir.failOn(failure);
       try {
@@ -1247,7 +1247,7 @@ public class TestIndexWriterExceptions e
         int numDocs = 10 + random().nextInt(30);
         for (int i = 0; i < numDocs; i++) {
           Document doc = new Document();
-          Field field = newField(random(), "field", "a field", TextField.TYPE_STORED);
+          Field field = newTextField(random(), "field", "a field", Field.Store.YES);
           doc.add(field);
           // random TV
           try {
@@ -1263,12 +1263,12 @@ public class TestIndexWriterExceptions e
             
         }
         Document document = new Document();
-        document.add(new Field("field", "a field", TextField.TYPE_STORED));
+        document.add(new TextField("field", "a field", Field.Store.YES));
         w.addDocument(document);
 
         for (int i = 0; i < numDocs; i++) {
           Document doc = new Document();
-          Field field = newField(random(), "field", "a field", TextField.TYPE_STORED);
+          Field field = newTextField(random(), "field", "a field", Field.Store.YES);
           doc.add(field);
           // random TV
           try {
@@ -1283,7 +1283,7 @@ public class TestIndexWriterExceptions e
           }
         }
         document = new Document();
-        document.add(new Field("field", "a field", TextField.TYPE_STORED));
+        document.add(new TextField("field", "a field", Field.Store.YES));
         w.addDocument(document);
         w.close();
         IndexReader reader = DirectoryReader.open(dir);
@@ -1333,7 +1333,7 @@ public class TestIndexWriterExceptions e
     final int numDocs1 = random().nextInt(25);
     for(int docCount=0;docCount<numDocs1;docCount++) {
       Document doc = new Document();
-      doc.add(newField("content", "good content", TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "good content", Field.Store.NO));
       w.addDocument(doc);
     }
     
@@ -1341,10 +1341,10 @@ public class TestIndexWriterExceptions e
     for(int docCount=0;docCount<7;docCount++) {
       Document doc = new Document();
       docs.add(doc);
-      doc.add(newField("id", docCount+"", StringField.TYPE_UNSTORED));
-      doc.add(newField("content", "silly content " + docCount, TextField.TYPE_UNSTORED));
+      doc.add(newStringField("id", docCount+"", Field.Store.NO));
+      doc.add(newTextField("content", "silly content " + docCount, Field.Store.NO));
       if (docCount == 4) {
-        Field f = newField("crash", "", TextField.TYPE_UNSTORED);
+        Field f = newTextField("crash", "", Field.Store.NO);
         doc.add(f);
         MockTokenizer tokenizer = new MockTokenizer(new StringReader("crash me on the 4th token"), MockTokenizer.WHITESPACE, false);
         tokenizer.setEnableChecks(false); // disable workflow checking as we forcefully close() in exceptional cases.
@@ -1363,7 +1363,7 @@ public class TestIndexWriterExceptions e
     final int numDocs2 = random().nextInt(25);
     for(int docCount=0;docCount<numDocs2;docCount++) {
       Document doc = new Document();
-      doc.add(newField("content", "good content", TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "good content", Field.Store.NO));
       w.addDocument(doc);
     }
 
@@ -1391,7 +1391,7 @@ public class TestIndexWriterExceptions e
     final int numDocs1 = random().nextInt(25);
     for(int docCount=0;docCount<numDocs1;docCount++) {
       Document doc = new Document();
-      doc.add(newField("content", "good content", TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "good content", Field.Store.NO));
       w.addDocument(doc);
     }
 
@@ -1401,16 +1401,16 @@ public class TestIndexWriterExceptions e
     for(int docCount=0;docCount<numDocs2;docCount++) {
       Document doc = new Document();
       docs.add(doc);
-      doc.add(newField("subid", "subs", StringField.TYPE_UNSTORED));
-      doc.add(newField("id", docCount+"", StringField.TYPE_UNSTORED));
-      doc.add(newField("content", "silly content " + docCount, TextField.TYPE_UNSTORED));
+      doc.add(newStringField("subid", "subs", Field.Store.NO));
+      doc.add(newStringField("id", docCount+"", Field.Store.NO));
+      doc.add(newTextField("content", "silly content " + docCount, Field.Store.NO));
     }
     w.addDocuments(docs);
 
     final int numDocs3 = random().nextInt(25);
     for(int docCount=0;docCount<numDocs3;docCount++) {
       Document doc = new Document();
-      doc.add(newField("content", "good content", TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "good content", Field.Store.NO));
       w.addDocument(doc);
     }
 
@@ -1420,10 +1420,10 @@ public class TestIndexWriterExceptions e
     for(int docCount=0;docCount<limit;docCount++) {
       Document doc = new Document();
       docs.add(doc);
-      doc.add(newField("id", docCount+"", StringField.TYPE_UNSTORED));
-      doc.add(newField("content", "silly content " + docCount, TextField.TYPE_UNSTORED));
+      doc.add(newStringField("id", docCount+"", Field.Store.NO));
+      doc.add(newTextField("content", "silly content " + docCount, Field.Store.NO));
       if (docCount == crashAt) {
-        Field f = newField("crash", "", TextField.TYPE_UNSTORED);
+        Field f = newTextField("crash", "", Field.Store.NO);
         doc.add(f);
         MockTokenizer tokenizer = new MockTokenizer(new StringReader("crash me on the 4th token"), MockTokenizer.WHITESPACE, false);
         tokenizer.setEnableChecks(false); // disable workflow checking as we forcefully close() in exceptional cases.
@@ -1443,7 +1443,7 @@ public class TestIndexWriterExceptions e
     final int numDocs4 = random().nextInt(25);
     for(int docCount=0;docCount<numDocs4;docCount++) {
       Document doc = new Document();
-      doc.add(newField("content", "good content", TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "good content", Field.Store.NO));
       w.addDocument(doc);
     }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterForceMerge.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterForceMerge.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterForceMerge.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterForceMerge.java Sun Jun 10 17:42:19 2012
@@ -21,7 +21,7 @@ import java.io.IOException;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.StringField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.MockDirectoryWrapper;
@@ -34,7 +34,7 @@ public class TestIndexWriterForceMerge e
     MockDirectoryWrapper dir = newDirectory();
 
     final Document doc = new Document();
-    doc.add(newField("content", "aaa", StringField.TYPE_UNSTORED));
+    doc.add(newStringField("content", "aaa", Field.Store.NO));
     final int incrMin = TEST_NIGHTLY ? 15 : 40;
     for(int numDocs=10;numDocs<500;numDocs += _TestUtil.nextInt(random(), incrMin, 5*incrMin)) {
       LogDocMergePolicy ldmp = new LogDocMergePolicy();
@@ -75,7 +75,7 @@ public class TestIndexWriterForceMerge e
     MockDirectoryWrapper dir = newDirectory();
 
     final Document doc = new Document();
-    doc.add(newField("content", "aaa", StringField.TYPE_UNSTORED));
+    doc.add(newStringField("content", "aaa", Field.Store.NO));
 
     LogDocMergePolicy ldmp = new LogDocMergePolicy();
     ldmp.setMinMergeDocs(1);
@@ -179,7 +179,7 @@ public class TestIndexWriterForceMerge e
               setMergePolicy(newLogMergePolicy(51))
       );
       Document doc = new Document();
-      doc.add(newField("field", "aaa", StringField.TYPE_UNSTORED));
+      doc.add(newStringField("field", "aaa", Field.Store.NO));
       for(int i=0;i<100;i++)
         writer.addDocument(doc);
       writer.forceMerge(1, false);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java Sun Jun 10 17:42:19 2012
@@ -21,7 +21,7 @@ import java.io.IOException;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.store.Directory;
 
@@ -223,7 +223,7 @@ public class TestIndexWriterMergePolicy 
 
   private void addDoc(IndexWriter writer) throws IOException {
     Document doc = new Document();
-    doc.add(newField("content", "aaa", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("content", "aaa", Field.Store.NO));
     writer.addDocument(doc);
   }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMerging.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMerging.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMerging.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMerging.java Sun Jun 10 17:42:19 2012
@@ -21,7 +21,6 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
-import org.apache.lucene.document.StringField;
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.util.LuceneTestCase;
@@ -111,7 +110,7 @@ public class TestIndexWriterMerging exte
     for (int i = start; i < (start + numDocs); i++)
     {
       Document temp = new Document();
-      temp.add(newField("count", (""+i), StringField.TYPE_STORED));
+      temp.add(newStringField("count", (""+i), Field.Store.YES));
 
       writer.addDocument(temp);
     }
@@ -131,13 +130,13 @@ public class TestIndexWriterMerging exte
     FieldType customType = new FieldType();
     customType.setStored(true);
 
-    FieldType customType1 = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType1 = new FieldType(TextField.TYPE_NOT_STORED);
     customType1.setTokenized(false);
     customType1.setStoreTermVectors(true);
     customType1.setStoreTermVectorPositions(true);
     customType1.setStoreTermVectorOffsets(true);
     
-    Field idField = newField("id", "", StringField.TYPE_UNSTORED);
+    Field idField = newStringField("id", "", Field.Store.NO);
     document.add(idField);
     Field storedField = newField("stored", "stored", customType);
     document.add(storedField);
@@ -194,7 +193,7 @@ public class TestIndexWriterMerging exte
     FieldType customType = new FieldType();
     customType.setStored(true);
 
-    FieldType customType1 = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType1 = new FieldType(TextField.TYPE_NOT_STORED);
     customType1.setTokenized(false);
     customType1.setStoreTermVectors(true);
     customType1.setStoreTermVectorPositions(true);
@@ -204,7 +203,7 @@ public class TestIndexWriterMerging exte
     document.add(storedField);
     Field termVectorField = newField("termVector", "termVector", customType1);
     document.add(termVectorField);
-    Field idField = newField("id", "", StringField.TYPE_UNSTORED);
+    Field idField = newStringField("id", "", Field.Store.NO);
     document.add(idField);
     for(int i=0;i<98;i++) {
       idField.setStringValue("" + i);
@@ -259,7 +258,7 @@ public class TestIndexWriterMerging exte
     FieldType customType = new FieldType();
     customType.setStored(true);
 
-    FieldType customType1 = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType1 = new FieldType(TextField.TYPE_NOT_STORED);
     customType1.setTokenized(false);
     customType1.setStoreTermVectors(true);
     customType1.setStoreTermVectorPositions(true);
@@ -270,7 +269,7 @@ public class TestIndexWriterMerging exte
     document.add(storedField);
     Field termVectorField = newField("termVector", "termVector", customType1);
     document.add(termVectorField);
-    Field idField = newField("id", "", StringField.TYPE_UNSTORED);
+    Field idField = newStringField("id", "", Field.Store.NO);
     document.add(idField);
     for(int i=0;i<98;i++) {
       idField.setStringValue("" + i);
@@ -343,7 +342,7 @@ public class TestIndexWriterMerging exte
     IndexWriter iw = new IndexWriter(dir, conf);
     Document document = new Document();
 
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
     customType.setStoreTermVectors(true);
     
     document.add(newField("tvtest", "a b c", customType));

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java Sun Jun 10 17:42:19 2012
@@ -92,7 +92,7 @@ public class TestIndexWriterNRTIsCurrent
       Random random = LuceneTestCase.random();
       try {
         Document doc = new Document();
-        doc.add(new Field("id", "1", TextField.TYPE_UNSTORED));
+        doc.add(new TextField("id", "1", Field.Store.NO));
         writer.addDocument(doc);
         holder.reader = currentReader = writer.getReader(true);
         Term term = new Term("id");

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java Sun Jun 10 17:42:19 2012
@@ -22,6 +22,7 @@ import java.io.IOException;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.codecs.LiveDocsFormat;
 import org.apache.lucene.document.Document;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
@@ -488,7 +489,7 @@ public class TestIndexWriterOnDiskFull e
 
     Document doc = new Document();
 
-    doc.add(newField("f", "doctor who", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("f", "doctor who", Field.Store.NO));
     w.addDocument(doc);
     w.commit();
 
@@ -557,15 +558,15 @@ public class TestIndexWriterOnDiskFull e
   private void addDoc(IndexWriter writer) throws IOException
   {
       Document doc = new Document();
-      doc.add(newField("content", "aaa", TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "aaa", Field.Store.NO));
       writer.addDocument(doc);
   }
   
   private void addDocWithIndex(IndexWriter writer, int index) throws IOException
   {
       Document doc = new Document();
-      doc.add(newField("content", "aaa " + index, TextField.TYPE_UNSTORED));
-      doc.add(newField("id", "" + index, TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "aaa " + index, Field.Store.NO));
+      doc.add(newTextField("id", "" + index, Field.Store.NO));
       writer.addDocument(doc);
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java Sun Jun 10 17:42:19 2012
@@ -26,10 +26,8 @@ import java.util.concurrent.atomic.Atomi
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.lucene.analysis.MockAnalyzer;
-import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
-import org.apache.lucene.document.StringField;
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.search.IndexSearcher;
@@ -145,7 +143,7 @@ public class TestIndexWriterReader exten
     
     Document newDoc = r1.document(10);
     newDoc.removeField("id");
-    newDoc.add(newField("id", Integer.toString(8000), StringField.TYPE_STORED));
+    newDoc.add(newStringField("id", Integer.toString(8000), Field.Store.YES));
     writer.updateDocument(new Term("id", id10), newDoc);
     assertFalse(r1.isCurrent());
 
@@ -169,7 +167,7 @@ public class TestIndexWriterReader exten
 
     writer = new IndexWriter(dir1, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
     Document doc = new Document();
-    doc.add(newField("field", "a b c", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("field", "a b c", Field.Store.NO));
     writer.addDocument(doc);
     assertTrue(r2.isCurrent());
     assertTrue(r3.isCurrent());
@@ -191,14 +189,14 @@ public class TestIndexWriterReader exten
     
     IndexWriter writer = new IndexWriter(dir, iwc);
     Document doc = new Document();
-    doc.add(newField("field", "a b c", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("field", "a b c", Field.Store.NO));
     writer.addDocument(doc);
     writer.close();
     
     iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
     writer = new IndexWriter(dir, iwc);
     doc = new Document();
-    doc.add(newField("field", "a b c", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("field", "a b c", Field.Store.NO));
     DirectoryReader nrtReader = writer.getReader();
     assertTrue(nrtReader.isCurrent());
     writer.addDocument(doc);
@@ -877,8 +875,8 @@ public class TestIndexWriterReader exten
     Directory dir = newDirectory();
     final IndexWriter w = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())).setMergePolicy(newLogMergePolicy()));
     Document doc = new Document();
-    doc.add(newField("field", "a b c", TextField.TYPE_UNSTORED));
-    Field id = newField("id", "", StringField.TYPE_UNSTORED);
+    doc.add(newTextField("field", "a b c", Field.Store.NO));
+    Field id = newStringField("id", "", Field.Store.NO);
     doc.add(id);
     id.setStringValue("0");
     w.addDocument(doc);
@@ -901,8 +899,8 @@ public class TestIndexWriterReader exten
     Directory dir = newDirectory();
     final IndexWriter w = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
     Document doc = new Document();
-    doc.add(newField("field", "a b c", TextField.TYPE_UNSTORED));
-    Field id = newField("id", "", StringField.TYPE_UNSTORED);
+    doc.add(newTextField("field", "a b c", Field.Store.NO));
+    Field id = newStringField("id", "", Field.Store.NO);
     doc.add(id);
     id.setStringValue("0");
     w.addDocument(doc);
@@ -958,7 +956,7 @@ public class TestIndexWriterReader exten
     );
 
     Document doc = new Document();
-    doc.add(newField("foo", "bar", StringField.TYPE_UNSTORED));
+    doc.add(newStringField("foo", "bar", Field.Store.NO));
     for(int i=0;i<20;i++) {
       w.addDocument(doc);
     }
@@ -982,7 +980,7 @@ public class TestIndexWriterReader exten
     Directory dir = newDirectory();
     IndexWriter w = new IndexWriter(dir, conf);
     Document doc = new Document();
-    doc.add(new TextField("f", "val"));
+    doc.add(new TextField("f", "val", Field.Store.NO));
     w.addDocument(doc);
     IndexReader r = DirectoryReader.open(w, true).getSequentialSubReaders()[0];
     try {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java Sun Jun 10 17:42:19 2012
@@ -26,8 +26,6 @@ import java.util.Set;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
-import org.apache.lucene.document.StringField;
-import org.apache.lucene.document.TextField;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.CharsRef;
@@ -237,10 +235,10 @@ public class TestIndexWriterUnicode exte
     Directory d = newDirectory();
     IndexWriter w = new IndexWriter(d, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
     Document doc = new Document();
-    doc.add(newField("field", "a a\uffffb", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("field", "a a\uffffb", Field.Store.NO));
     w.addDocument(doc);
     doc = new Document();
-    doc.add(newField("field", "a", TextField.TYPE_UNSTORED));
+    doc.add(newTextField("field", "a", Field.Store.NO));
     w.addDocument(doc);
     IndexReader r = w.getReader();
     assertEquals(1, r.docFreq(new Term("field", "a\uffffb")));
@@ -257,7 +255,7 @@ public class TestIndexWriterUnicode exte
 
     final int count = utf8Data.length/2;
     for(int i=0;i<count;i++)
-      doc.add(newField("f" + i, utf8Data[2*i], TextField.TYPE_STORED));
+      doc.add(newTextField("f" + i, utf8Data[2*i], Field.Store.YES));
     w.addDocument(doc);
     w.close();
 
@@ -279,7 +277,7 @@ public class TestIndexWriterUnicode exte
     RandomIndexWriter writer = new RandomIndexWriter(rnd, dir);
     Document d = new Document();
     // Single segment
-    Field f = newField("f", "", StringField.TYPE_UNSTORED);
+    Field f = newStringField("f", "", Field.Store.NO);
     d.add(f);
     char[] chars = new char[2];
     final Set<String> allTerms = new HashSet<String>();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java Sun Jun 10 17:42:19 2012
@@ -477,7 +477,7 @@ public class TestIndexWriterWithThreads 
      public void run() {
        try {
          Document doc = new Document();
-         Field field = newField("field", "testData", TextField.TYPE_STORED);
+         Field field = newTextField("field", "testData", Field.Store.YES);
          doc.add(field);
          IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(
              TEST_VERSION_CURRENT, new MockAnalyzer(random())));

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java Sun Jun 10 17:42:19 2012
@@ -25,7 +25,7 @@ import java.util.Iterator;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.StringField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.search.BooleanClause;
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.search.DocIdSetIterator;
@@ -194,7 +194,7 @@ public class TestIndexableField extends 
               assert fieldUpto < fieldCount;
               if (fieldUpto == 0) {
                 fieldUpto = 1;
-                return newField("id", ""+finalDocCount, StringField.TYPE_STORED);
+                return newStringField("id", ""+finalDocCount, Field.Store.YES);
               } else {
                 return new MyField(finalBaseCount + (fieldUpto++-1));
               }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIsCurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIsCurrent.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIsCurrent.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIsCurrent.java Sun Jun 10 17:42:19 2012
@@ -18,7 +18,7 @@ package org.apache.lucene.index;
  */
 
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.util.*;
 import org.apache.lucene.store.*;
 
@@ -42,7 +42,7 @@ public class TestIsCurrent extends Lucen
 
     // write document
     Document doc = new Document();
-    doc.add(newField("UUID", "1", TextField.TYPE_STORED));
+    doc.add(newTextField("UUID", "1", Field.Store.YES));
     writer.addDocument(doc);
     writer.commit();
   }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java Sun Jun 10 17:42:19 2012
@@ -22,7 +22,7 @@ import java.io.Reader;
 
 import org.apache.lucene.analysis.*;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.PhraseQuery;
 import org.apache.lucene.search.ScoreDoc;
@@ -97,7 +97,7 @@ public class TestLazyProxSkipping extend
                 content = this.term3 + " " + this.term2;
             }
 
-            doc.add(newField(this.field, content, TextField.TYPE_STORED));
+            doc.add(newTextField(this.field, content, Field.Store.YES));
             writer.addDocument(doc);
         }
         
@@ -146,7 +146,7 @@ public class TestLazyProxSkipping extend
         IndexWriter writer = new IndexWriter(directory, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
         for (int i = 0; i < 10; i++) {
             Document doc = new Document();
-            doc.add(newField(this.field, "a b", TextField.TYPE_STORED));
+            doc.add(newTextField(this.field, "a b", Field.Store.YES));
             writer.addDocument(doc);
         }
         

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLongPostings.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLongPostings.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLongPostings.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLongPostings.java Sun Jun 10 17:42:19 2012
@@ -121,7 +121,7 @@ public class TestLongPostings extends Lu
 	  for(int idx=0;idx<NUM_DOCS;idx++) {
 	    final Document doc = new Document();
 	    String s = isS1.get(idx) ? s1 : s2;
-	    final Field f = newField("field", s, TextField.TYPE_UNSTORED);
+	    final Field f = newTextField("field", s, Field.Store.NO);
 	    final int count = _TestUtil.nextInt(random(), 1, 4);
 	    for(int ct=0;ct<count;ct++) {
 	      doc.add(f);
@@ -307,7 +307,7 @@ public class TestLongPostings extends Lu
       iwc.setMaxBufferedDocs(-1);
       final RandomIndexWriter riw = new RandomIndexWriter(random(), dir, iwc);
 
-      FieldType ft = new FieldType(TextField.TYPE_UNSTORED);
+      FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
       ft.setIndexOptions(options);
       for(int idx=0;idx<NUM_DOCS;idx++) {
         final Document doc = new Document();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java Sun Jun 10 17:42:19 2012
@@ -26,7 +26,6 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
-import org.apache.lucene.document.TextField;
 import org.apache.lucene.search.similarities.DefaultSimilarity;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
@@ -50,7 +49,7 @@ public class TestMaxTermFrequency extend
     config.setSimilarity(new TestSimilarity());
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir, config);
     Document doc = new Document();
-    Field foo = newField("foo", "", TextField.TYPE_UNSTORED);
+    Field foo = newTextField("foo", "", Field.Store.NO);
     doc.add(foo);
     for (int i = 0; i < 100; i++) {
       foo.setStringValue(addValue());

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedCodecs.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedCodecs.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedCodecs.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedCodecs.java Sun Jun 10 17:42:19 2012
@@ -23,7 +23,7 @@ import java.util.Set;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.StringField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
@@ -59,7 +59,7 @@ public class TestMixedCodecs extends Luc
         docsLeftInThisSegment = _TestUtil.nextInt(random(), 10, 100);
       }
       final Document doc = new Document();
-      doc.add(newField("id", String.valueOf(docUpto), StringField.TYPE_STORED));
+      doc.add(newStringField("id", String.valueOf(docUpto), Field.Store.YES));
       w.addDocument(doc);
       docUpto++;
       docsLeftInThisSegment--;

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java Sun Jun 10 17:42:19 2012
@@ -45,9 +45,9 @@ public class TestMultiFields extends Luc
 
       int numDocs = _TestUtil.nextInt(random(), 1, 100 * RANDOM_MULTIPLIER);
       Document doc = new Document();
-      Field f = newField("field", "", StringField.TYPE_UNSTORED);
+      Field f = newStringField("field", "", Field.Store.NO);
       doc.add(f);
-      Field id = newField("id", "", StringField.TYPE_UNSTORED);
+      Field id = newStringField("id", "", Field.Store.NO);
       doc.add(id);
 
       boolean onlyUniqueTerms = random().nextBoolean();
@@ -156,7 +156,7 @@ public class TestMultiFields extends Luc
     Directory dir = newDirectory();
     IndexWriter w = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
     Document d = new Document();
-    d.add(newField("f", "j", StringField.TYPE_UNSTORED));
+    d.add(newStringField("f", "j", Field.Store.NO));
     w.addDocument(d);
     w.commit();
     w.addDocument(d);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java Sun Jun 10 17:42:19 2012
@@ -25,7 +25,7 @@ import org.apache.lucene.analysis.*;
 import org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
 import org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -73,7 +73,7 @@ public class TestMultiLevelSkipList exte
     Term term = new Term("test", "a");
     for (int i = 0; i < 5000; i++) {
       Document d1 = new Document();
-      d1.add(newField(term.field(), term.text(), TextField.TYPE_UNSTORED));
+      d1.add(newTextField(term.field(), term.text(), Field.Store.NO));
       writer.addDocument(d1);
     }
     writer.commit();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNeverDelete.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNeverDelete.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNeverDelete.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNeverDelete.java Sun Jun 10 17:42:19 2012
@@ -23,8 +23,7 @@ import java.util.Set;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.StringField;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
@@ -60,8 +59,8 @@ public class TestNeverDelete extends Luc
               int docCount = 0;
               while (System.currentTimeMillis() < stopTime) {
                 final Document doc = new Document();
-                doc.add(newField("dc", ""+docCount, StringField.TYPE_STORED));
-                doc.add(newField("field", "here is some text", TextField.TYPE_STORED));
+                doc.add(newStringField("dc", ""+docCount, Field.Store.YES));
+                doc.add(newTextField("field", "here is some text", Field.Store.YES));
                 w.addDocument(doc);
 
                 if (docCount % 13 == 0) {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java Sun Jun 10 17:42:19 2012
@@ -23,7 +23,7 @@ import java.lang.reflect.Modifier;
 import java.util.Arrays;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
@@ -73,7 +73,7 @@ public class TestNoDeletionPolicy extend
         .setIndexDeletionPolicy(NoDeletionPolicy.INSTANCE));
     for (int i = 0; i < 10; i++) {
       Document doc = new Document();
-      doc.add(newField("c", "a" + i, TextField.TYPE_STORED));
+      doc.add(newTextField("c", "a" + i, Field.Store.YES));
       writer.addDocument(doc);
       writer.commit();
       assertEquals("wrong number of commits !", i + 1, DirectoryReader.listCommits(dir).size());

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java Sun Jun 10 17:42:19 2012
@@ -30,7 +30,6 @@ import org.apache.lucene.search.similari
 import org.apache.lucene.search.similarities.PerFieldSimilarityWrapper;
 import org.apache.lucene.search.similarities.Similarity;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.LineFileDocs;
 import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.LuceneTestCase;
@@ -68,8 +67,8 @@ public class TestNorms extends LuceneTes
     config.setSimilarity(new CustomNormEncodingSimilarity());
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir, config);
     Document doc = new Document();
-    Field foo = newField("foo", "", TextField.TYPE_UNSTORED);
-    Field bar = newField("bar", "", TextField.TYPE_UNSTORED);
+    Field foo = newTextField("foo", "", Field.Store.NO);
+    Field bar = newTextField("bar", "", Field.Store.NO);
     doc.add(foo);
     doc.add(bar);
     
@@ -189,8 +188,7 @@ public class TestNorms extends LuceneTes
     for (int i = 0; i < num; i++) {
       Document doc = docs.nextDoc();
       int boost = writeNorms ? 1 + random().nextInt(255) : 0;
-      Field f = new Field(byteTestField, "" + boost,
-          TextField.TYPE_STORED);
+      Field f = new TextField(byteTestField, "" + boost, Field.Store.YES);
       f.setBoost(boost);
       doc.add(f);
       writer.addDocument(doc);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitNorms.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitNorms.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitNorms.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitNorms.java Sun Jun 10 17:42:19 2012
@@ -39,11 +39,11 @@ public class TestOmitNorms extends Lucen
     Document d = new Document();
         
     // this field will have norms
-    Field f1 = newField("f1", "This field has norms", TextField.TYPE_UNSTORED);
+    Field f1 = newTextField("f1", "This field has norms", Field.Store.NO);
     d.add(f1);
        
     // this field will NOT have norms
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
     customType.setOmitNorms(true);
     Field f2 = newField("f2", "This field has NO norms in all docs", customType);
     d.add(f2);
@@ -57,7 +57,7 @@ public class TestOmitNorms extends Lucen
     // Reverse
     d.add(newField("f1", "This field has norms", customType));
         
-    d.add(newField("f2", "This field has NO norms in all docs", TextField.TYPE_UNSTORED));
+    d.add(newTextField("f2", "This field has NO norms in all docs", Field.Store.NO));
         
     writer.addDocument(d);
 
@@ -89,11 +89,11 @@ public class TestOmitNorms extends Lucen
     Document d = new Document();
         
     // this field will have norms
-    Field f1 = newField("f1", "This field has norms", TextField.TYPE_UNSTORED);
+    Field f1 = newTextField("f1", "This field has norms", Field.Store.NO);
     d.add(f1);
        
     // this field will NOT have norms
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
     customType.setOmitNorms(true);
     Field f2 = newField("f2", "This field has NO norms in all docs", customType);
     d.add(f2);
@@ -109,7 +109,7 @@ public class TestOmitNorms extends Lucen
     // Reverese
     d.add(newField("f1", "This field has norms", customType));
         
-    d.add(newField("f2", "This field has NO norms in all docs", TextField.TYPE_UNSTORED));
+    d.add(newTextField("f2", "This field has NO norms in all docs", Field.Store.NO));
         
     for (int i = 0; i < 30; i++) {
       writer.addDocument(d);
@@ -144,12 +144,12 @@ public class TestOmitNorms extends Lucen
     Document d = new Document();
         
     // this field will have norms
-    Field f1 = newField("f1", "This field has norms", TextField.TYPE_UNSTORED);
+    Field f1 = newTextField("f1", "This field has norms", Field.Store.NO);
     d.add(f1);
        
     // this field will NOT have norms
 
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
     customType.setOmitNorms(true);
     Field f2 = newField("f2", "This field has NO norms in all docs", customType);
     d.add(f2);
@@ -196,7 +196,7 @@ public class TestOmitNorms extends Lucen
     lmp.setUseCompoundFile(false);
     Document d = new Document();
 
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
     customType.setOmitNorms(true);
     Field f1 = newField("f1", "This field has no norms", customType);
     d.add(f1);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitPositions.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitPositions.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitPositions.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitPositions.java Sun Jun 10 17:42:19 2012
@@ -40,7 +40,7 @@ public class TestOmitPositions extends L
     Directory dir = newDirectory();
     RandomIndexWriter w = new RandomIndexWriter(random(), dir);
     Document doc = new Document();
-    FieldType ft = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
     ft.setIndexOptions(IndexOptions.DOCS_AND_FREQS);
     Field f = newField("foo", "this is a test test", ft);
     doc.add(f);
@@ -71,7 +71,7 @@ public class TestOmitPositions extends L
     Document d = new Document();
         
     // f1,f2,f3: docs only
-    FieldType ft = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
     ft.setIndexOptions(IndexOptions.DOCS_ONLY);
     
     Field f1 = newField("f1", "This field has docs only", ft);
@@ -83,7 +83,7 @@ public class TestOmitPositions extends L
     Field f3 = newField("f3", "This field has docs only", ft);
     d.add(f3);
 
-    FieldType ft2 = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType ft2 = new FieldType(TextField.TYPE_NOT_STORED);
     ft2.setIndexOptions(IndexOptions.DOCS_AND_FREQS);
     
     // f4,f5,f6 docs and freqs
@@ -96,7 +96,7 @@ public class TestOmitPositions extends L
     Field f6 = newField("f6", "This field has docs and freqs", ft2);
     d.add(f6);
     
-    FieldType ft3 = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType ft3 = new FieldType(TextField.TYPE_NOT_STORED);
     ft3.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
     
     // f7,f8,f9 docs/freqs/positions
@@ -197,7 +197,7 @@ public class TestOmitPositions extends L
     lmp.setUseCompoundFile(false);
     Document d = new Document();
 
-    FieldType ft = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
     ft.setIndexOptions(IndexOptions.DOCS_AND_FREQS);
     Field f1 = newField("f1", "This field has term freqs", ft);
     d.add(f1);
@@ -211,7 +211,7 @@ public class TestOmitPositions extends L
     
     // now add some documents with positions, and check there is no prox after optimization
     d = new Document();
-    f1 = newField("f1", "This field has positions", TextField.TYPE_UNSTORED);
+    f1 = newTextField("f1", "This field has positions", Field.Store.NO);
     d.add(f1);
     
     for(int i=0;i<30;i++)

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java Sun Jun 10 17:42:19 2012
@@ -30,7 +30,6 @@ import org.apache.lucene.document.FieldT
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.search.*;
 import org.apache.lucene.search.BooleanClause.Occur;
-import org.apache.lucene.search.similarities.Similarity;
 import org.apache.lucene.search.similarities.TFIDFSimilarity;
 import org.apache.lucene.store.Directory;
 
@@ -50,8 +49,8 @@ public class TestOmitTf extends LuceneTe
     @Override public float scorePayload(int doc, int start, int end, BytesRef payload) { return 1.0f; }
   }
 
-  private static final FieldType omitType = new FieldType(TextField.TYPE_UNSTORED);
-  private static final FieldType normalType = new FieldType(TextField.TYPE_UNSTORED);
+  private static final FieldType omitType = new FieldType(TextField.TYPE_NOT_STORED);
+  private static final FieldType normalType = new FieldType(TextField.TYPE_NOT_STORED);
   
   static {
     omitType.setIndexOptions(IndexOptions.DOCS_ONLY);
@@ -229,7 +228,7 @@ public class TestOmitTf extends LuceneTe
     // now add some documents with positions, and check
     // there is no prox after full merge
     d = new Document();
-    f1 = newField("f1", "This field has positions", TextField.TYPE_UNSTORED);
+    f1 = newTextField("f1", "This field has positions", Field.Store.NO);
     d.add(f1);
     
     for(int i=0;i<30;i++)
@@ -430,7 +429,7 @@ public class TestOmitTf extends LuceneTe
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir,
         newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
     Document doc = new Document();
-    FieldType ft = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
     ft.setIndexOptions(IndexOptions.DOCS_ONLY);
     ft.freeze();
     Field f = newField("foo", "bar", ft);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelAtomicReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelAtomicReader.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelAtomicReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelAtomicReader.java Sun Jun 10 17:42:19 2012
@@ -22,7 +22,7 @@ import java.util.Random;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.search.*;
 import org.apache.lucene.store.Directory;
@@ -122,7 +122,7 @@ public class TestParallelAtomicReader ex
     IndexWriter w2 = new IndexWriter(dir2, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
     Document d3 = new Document();
 
-    d3.add(newField("f3", "v1", TextField.TYPE_STORED));
+    d3.add(newTextField("f3", "v1", Field.Store.YES));
     w2.addDocument(d3);
     w2.close();
     
@@ -238,16 +238,16 @@ public class TestParallelAtomicReader ex
     dir = newDirectory();
     IndexWriter w = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     Document d1 = new Document();
-    d1.add(newField("f1", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f2", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f3", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f4", "v1", TextField.TYPE_STORED));
+    d1.add(newTextField("f1", "v1", Field.Store.YES));
+    d1.add(newTextField("f2", "v1", Field.Store.YES));
+    d1.add(newTextField("f3", "v1", Field.Store.YES));
+    d1.add(newTextField("f4", "v1", Field.Store.YES));
     w.addDocument(d1);
     Document d2 = new Document();
-    d2.add(newField("f1", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f2", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f3", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f4", "v2", TextField.TYPE_STORED));
+    d2.add(newTextField("f1", "v2", Field.Store.YES));
+    d2.add(newTextField("f2", "v2", Field.Store.YES));
+    d2.add(newTextField("f3", "v2", Field.Store.YES));
+    d2.add(newTextField("f4", "v2", Field.Store.YES));
     w.addDocument(d2);
     w.close();
 
@@ -269,12 +269,12 @@ public class TestParallelAtomicReader ex
     Directory dir1 = newDirectory();
     IndexWriter w1 = new IndexWriter(dir1, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     Document d1 = new Document();
-    d1.add(newField("f1", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f2", "v1", TextField.TYPE_STORED));
+    d1.add(newTextField("f1", "v1", Field.Store.YES));
+    d1.add(newTextField("f2", "v1", Field.Store.YES));
     w1.addDocument(d1);
     Document d2 = new Document();
-    d2.add(newField("f1", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f2", "v2", TextField.TYPE_STORED));
+    d2.add(newTextField("f1", "v2", Field.Store.YES));
+    d2.add(newTextField("f2", "v2", Field.Store.YES));
     w1.addDocument(d2);
     w1.close();
     return dir1;
@@ -284,12 +284,12 @@ public class TestParallelAtomicReader ex
     Directory dir2 = newDirectory();
     IndexWriter w2 = new IndexWriter(dir2, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     Document d3 = new Document();
-    d3.add(newField("f3", "v1", TextField.TYPE_STORED));
-    d3.add(newField("f4", "v1", TextField.TYPE_STORED));
+    d3.add(newTextField("f3", "v1", Field.Store.YES));
+    d3.add(newTextField("f4", "v1", Field.Store.YES));
     w2.addDocument(d3);
     Document d4 = new Document();
-    d4.add(newField("f3", "v2", TextField.TYPE_STORED));
-    d4.add(newField("f4", "v2", TextField.TYPE_STORED));
+    d4.add(newTextField("f3", "v2", Field.Store.YES));
+    d4.add(newTextField("f4", "v2", Field.Store.YES));
     w2.addDocument(d4);
     w2.close();
     return dir2;

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java Sun Jun 10 17:42:19 2012
@@ -22,7 +22,7 @@ import java.util.Random;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.search.*;
 import org.apache.lucene.store.Directory;
@@ -123,7 +123,7 @@ public class TestParallelCompositeReader
     IndexWriter w2 = new IndexWriter(dir2, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
     Document d3 = new Document();
 
-    d3.add(newField("f3", "v1", TextField.TYPE_STORED));
+    d3.add(newTextField("f3", "v1", Field.Store.YES));
     w2.addDocument(d3);
     w2.close();
     
@@ -297,28 +297,28 @@ public class TestParallelCompositeReader
     dir = newDirectory();
     IndexWriter w = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     Document d1 = new Document();
-    d1.add(newField("f1", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f2", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f3", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f4", "v1", TextField.TYPE_STORED));
+    d1.add(newTextField("f1", "v1", Field.Store.YES));
+    d1.add(newTextField("f2", "v1", Field.Store.YES));
+    d1.add(newTextField("f3", "v1", Field.Store.YES));
+    d1.add(newTextField("f4", "v1", Field.Store.YES));
     w.addDocument(d1);
     Document d2 = new Document();
-    d2.add(newField("f1", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f2", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f3", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f4", "v2", TextField.TYPE_STORED));
+    d2.add(newTextField("f1", "v2", Field.Store.YES));
+    d2.add(newTextField("f2", "v2", Field.Store.YES));
+    d2.add(newTextField("f3", "v2", Field.Store.YES));
+    d2.add(newTextField("f4", "v2", Field.Store.YES));
     w.addDocument(d2);
     Document d3 = new Document();
-    d3.add(newField("f1", "v3", TextField.TYPE_STORED));
-    d3.add(newField("f2", "v3", TextField.TYPE_STORED));
-    d3.add(newField("f3", "v3", TextField.TYPE_STORED));
-    d3.add(newField("f4", "v3", TextField.TYPE_STORED));
+    d3.add(newTextField("f1", "v3", Field.Store.YES));
+    d3.add(newTextField("f2", "v3", Field.Store.YES));
+    d3.add(newTextField("f3", "v3", Field.Store.YES));
+    d3.add(newTextField("f4", "v3", Field.Store.YES));
     w.addDocument(d3);
     Document d4 = new Document();
-    d4.add(newField("f1", "v4", TextField.TYPE_STORED));
-    d4.add(newField("f2", "v4", TextField.TYPE_STORED));
-    d4.add(newField("f3", "v4", TextField.TYPE_STORED));
-    d4.add(newField("f4", "v4", TextField.TYPE_STORED));
+    d4.add(newTextField("f1", "v4", Field.Store.YES));
+    d4.add(newTextField("f2", "v4", Field.Store.YES));
+    d4.add(newTextField("f3", "v4", Field.Store.YES));
+    d4.add(newTextField("f4", "v4", Field.Store.YES));
     w.addDocument(d4);
     w.close();
 
@@ -357,22 +357,22 @@ public class TestParallelCompositeReader
     IndexWriter w1 = new IndexWriter(dir1, newIndexWriterConfig(TEST_VERSION_CURRENT,
         new MockAnalyzer(random)).setMergePolicy(NoMergePolicy.NO_COMPOUND_FILES));
     Document d1 = new Document();
-    d1.add(newField("f1", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f2", "v1", TextField.TYPE_STORED));
+    d1.add(newTextField("f1", "v1", Field.Store.YES));
+    d1.add(newTextField("f2", "v1", Field.Store.YES));
     w1.addDocument(d1);
     w1.commit();
     Document d2 = new Document();
-    d2.add(newField("f1", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f2", "v2", TextField.TYPE_STORED));
+    d2.add(newTextField("f1", "v2", Field.Store.YES));
+    d2.add(newTextField("f2", "v2", Field.Store.YES));
     w1.addDocument(d2);
     Document d3 = new Document();
-    d3.add(newField("f1", "v3", TextField.TYPE_STORED));
-    d3.add(newField("f2", "v3", TextField.TYPE_STORED));
+    d3.add(newTextField("f1", "v3", Field.Store.YES));
+    d3.add(newTextField("f2", "v3", Field.Store.YES));
     w1.addDocument(d3);
     w1.commit();
     Document d4 = new Document();
-    d4.add(newField("f1", "v4", TextField.TYPE_STORED));
-    d4.add(newField("f2", "v4", TextField.TYPE_STORED));
+    d4.add(newTextField("f1", "v4", Field.Store.YES));
+    d4.add(newTextField("f2", "v4", Field.Store.YES));
     w1.addDocument(d4);
     w1.close();
     return dir1;
@@ -384,22 +384,22 @@ public class TestParallelCompositeReader
     IndexWriter w2 = new IndexWriter(dir2, newIndexWriterConfig(TEST_VERSION_CURRENT,
         new MockAnalyzer(random)).setMergePolicy(NoMergePolicy.NO_COMPOUND_FILES));
     Document d1 = new Document();
-    d1.add(newField("f3", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f4", "v1", TextField.TYPE_STORED));
+    d1.add(newTextField("f3", "v1", Field.Store.YES));
+    d1.add(newTextField("f4", "v1", Field.Store.YES));
     w2.addDocument(d1);
     w2.commit();
     Document d2 = new Document();
-    d2.add(newField("f3", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f4", "v2", TextField.TYPE_STORED));
+    d2.add(newTextField("f3", "v2", Field.Store.YES));
+    d2.add(newTextField("f4", "v2", Field.Store.YES));
     w2.addDocument(d2);
     Document d3 = new Document();
-    d3.add(newField("f3", "v3", TextField.TYPE_STORED));
-    d3.add(newField("f4", "v3", TextField.TYPE_STORED));
+    d3.add(newTextField("f3", "v3", Field.Store.YES));
+    d3.add(newTextField("f4", "v3", Field.Store.YES));
     w2.addDocument(d3);
     w2.commit();
     Document d4 = new Document();
-    d4.add(newField("f3", "v4", TextField.TYPE_STORED));
-    d4.add(newField("f4", "v4", TextField.TYPE_STORED));
+    d4.add(newTextField("f3", "v4", Field.Store.YES));
+    d4.add(newTextField("f4", "v4", Field.Store.YES));
     w2.addDocument(d4);
     w2.close();
     return dir2;
@@ -411,22 +411,22 @@ public class TestParallelCompositeReader
     IndexWriter w2 = new IndexWriter(dir2, newIndexWriterConfig(TEST_VERSION_CURRENT,
         new MockAnalyzer(random)).setMergePolicy(NoMergePolicy.NO_COMPOUND_FILES));
     Document d1 = new Document();
-    d1.add(newField("f3", "v1", TextField.TYPE_STORED));
-    d1.add(newField("f4", "v1", TextField.TYPE_STORED));
+    d1.add(newTextField("f3", "v1", Field.Store.YES));
+    d1.add(newTextField("f4", "v1", Field.Store.YES));
     w2.addDocument(d1);
     w2.commit();
     Document d2 = new Document();
-    d2.add(newField("f3", "v2", TextField.TYPE_STORED));
-    d2.add(newField("f4", "v2", TextField.TYPE_STORED));
+    d2.add(newTextField("f3", "v2", Field.Store.YES));
+    d2.add(newTextField("f4", "v2", Field.Store.YES));
     w2.addDocument(d2);
     w2.commit();
     Document d3 = new Document();
-    d3.add(newField("f3", "v3", TextField.TYPE_STORED));
-    d3.add(newField("f4", "v3", TextField.TYPE_STORED));
+    d3.add(newTextField("f3", "v3", Field.Store.YES));
+    d3.add(newTextField("f4", "v3", Field.Store.YES));
     w2.addDocument(d3);
     Document d4 = new Document();
-    d4.add(newField("f3", "v4", TextField.TYPE_STORED));
-    d4.add(newField("f4", "v4", TextField.TYPE_STORED));
+    d4.add(newTextField("f3", "v4", Field.Store.YES));
+    d4.add(newTextField("f4", "v4", Field.Store.YES));
     w2.addDocument(d4);
     w2.close();
     return dir2;

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java Sun Jun 10 17:42:19 2012
@@ -27,7 +27,6 @@ import org.apache.lucene.document.TextFi
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util._TestUtil;
 
 /**
  * Some tests for {@link ParallelAtomicReader}s with empty indexes
@@ -94,14 +93,14 @@ public class TestParallelReaderEmptyInde
       }
       IndexWriter iw = new IndexWriter(rd1, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random())));
       Document doc = new Document();
-      Field idField = newField("id", "", TextField.TYPE_UNSTORED);
+      Field idField = newTextField("id", "", Field.Store.NO);
       doc.add(idField);
-      FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
+      FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
       customType.setStoreTermVectors(true);
       doc.add(newField("test", "", customType));
       idField.setStringValue("1");
       iw.addDocument(doc);
-      doc.add(newField("test", "", TextField.TYPE_UNSTORED));
+      doc.add(newTextField("test", "", Field.Store.NO));
       idField.setStringValue("2");
       iw.addDocument(doc);
       iw.close();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelTermEnum.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelTermEnum.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelTermEnum.java Sun Jun 10 17:42:19 2012
@@ -21,7 +21,7 @@ import java.io.IOException;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.Bits;
@@ -44,8 +44,8 @@ public class TestParallelTermEnum extend
         TEST_VERSION_CURRENT, new MockAnalyzer(random())));
 
     doc = new Document();
-    doc.add(newField("field1", "the quick brown fox jumps", TextField.TYPE_STORED));
-    doc.add(newField("field2", "the quick brown fox jumps", TextField.TYPE_STORED));
+    doc.add(newTextField("field1", "the quick brown fox jumps", Field.Store.YES));
+    doc.add(newTextField("field2", "the quick brown fox jumps", Field.Store.YES));
     iw1.addDocument(doc);
 
     iw1.close();
@@ -54,8 +54,8 @@ public class TestParallelTermEnum extend
         TEST_VERSION_CURRENT, new MockAnalyzer(random())));
 
     doc = new Document();
-    doc.add(newField("field1", "the fox jumps over the lazy dog", TextField.TYPE_STORED));
-    doc.add(newField("field3", "the fox jumps over the lazy dog", TextField.TYPE_STORED));
+    doc.add(newTextField("field1", "the fox jumps over the lazy dog", Field.Store.YES));
+    doc.add(newTextField("field3", "the fox jumps over the lazy dog", Field.Store.YES));
     iw2.addDocument(doc);
 
     iw2.close();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java Sun Jun 10 17:42:19 2012
@@ -28,6 +28,7 @@ import org.apache.lucene.analysis.TokenS
 import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
 import org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
 import org.apache.lucene.document.Document;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor;
@@ -138,12 +139,12 @@ public class TestPayloadProcessorProvide
     );
     TokenStream payloadTS1 = new PayloadTokenStream("p1");
     TokenStream payloadTS2 = new PayloadTokenStream("p2");
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
     customType.setOmitNorms(true);
     for (int i = 0; i < NUM_DOCS; i++) {
       Document doc = new Document();
       doc.add(newField("id", "doc" + i, customType));
-      doc.add(newField("content", "doc content " + i, TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", "doc content " + i, Field.Store.NO));
       doc.add(new TextField("p", payloadTS1));
       doc.add(new TextField("p", payloadTS2));
       writer.addDocument(doc);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloads.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloads.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloads.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloads.java Sun Jun 10 17:42:19 2012
@@ -63,15 +63,15 @@ public class TestPayloads extends Lucene
         IndexWriter writer = new IndexWriter(ram, newIndexWriterConfig( TEST_VERSION_CURRENT, analyzer));
         Document d = new Document();
         // this field won't have any payloads
-        d.add(newField("f1", "This field has no payloads", TextField.TYPE_UNSTORED));
+        d.add(newTextField("f1", "This field has no payloads", Field.Store.NO));
         // this field will have payloads in all docs, however not for all term positions,
         // so this field is used to check if the DocumentWriter correctly enables the payloads bit
         // even if only some term positions have payloads
-        d.add(newField("f2", "This field has payloads in all docs", TextField.TYPE_UNSTORED));
-        d.add(newField("f2", "This field has payloads in all docs NO PAYLOAD", TextField.TYPE_UNSTORED));
+        d.add(newTextField("f2", "This field has payloads in all docs", Field.Store.NO));
+        d.add(newTextField("f2", "This field has payloads in all docs NO PAYLOAD", Field.Store.NO));
         // this field is used to verify if the SegmentMerger enables payloads for a field if it has payloads 
         // enabled in only some documents
-        d.add(newField("f3", "This field has payloads in some docs", TextField.TYPE_UNSTORED));
+        d.add(newTextField("f3", "This field has payloads in some docs", Field.Store.NO));
         // only add payload data for field f2
         analyzer.setPayloadData("f2", "somedata".getBytes(), 0, 1);
         writer.addDocument(d);
@@ -91,10 +91,10 @@ public class TestPayloads extends Lucene
         writer = new IndexWriter(ram, newIndexWriterConfig( TEST_VERSION_CURRENT,
             analyzer).setOpenMode(OpenMode.CREATE));
         d = new Document();
-        d.add(newField("f1", "This field has no payloads", TextField.TYPE_UNSTORED));
-        d.add(newField("f2", "This field has payloads in all docs", TextField.TYPE_UNSTORED));
-        d.add(newField("f2", "This field has payloads in all docs", TextField.TYPE_UNSTORED));
-        d.add(newField("f3", "This field has payloads in some docs", TextField.TYPE_UNSTORED));
+        d.add(newTextField("f1", "This field has no payloads", Field.Store.NO));
+        d.add(newTextField("f2", "This field has payloads in all docs", Field.Store.NO));
+        d.add(newTextField("f2", "This field has payloads in all docs", Field.Store.NO));
+        d.add(newTextField("f3", "This field has payloads in some docs", Field.Store.NO));
         // add payload data for field f2 and f3
         analyzer.setPayloadData("f2", "somedata".getBytes(), 0, 1);
         analyzer.setPayloadData("f3", "somedata".getBytes(), 0, 3);
@@ -151,7 +151,7 @@ public class TestPayloads extends Lucene
         byte[] payloadData = generateRandomData(payloadDataLength);
         
         Document d = new Document();
-        d.add(newField(fieldName, content, TextField.TYPE_UNSTORED));
+        d.add(newTextField(fieldName, content, Field.Store.NO));
         // add the same document multiple times to have the same payload lengths for all
         // occurrences within two consecutive skip intervals
         int offset = 0;
@@ -285,7 +285,7 @@ public class TestPayloads extends Lucene
         String singleTerm = "lucene";
         
         d = new Document();
-        d.add(newField(fieldName, singleTerm, TextField.TYPE_UNSTORED));
+        d.add(newTextField(fieldName, singleTerm, Field.Store.NO));
         // add a payload whose length is greater than the buffer size of BufferedIndexOutput
         payloadData = generateRandomData(2000);
         analyzer.setPayloadData(fieldName, payloadData, 100, 1500);
@@ -581,14 +581,14 @@ public class TestPayloads extends Lucene
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir,
                                                      new MockAnalyzer(random(), MockTokenizer.WHITESPACE, true));
     Document doc = new Document();
-    doc.add(new Field("hasMaybepayload", "here we go", TextField.TYPE_STORED));
+    doc.add(new TextField("hasMaybepayload", "here we go", Field.Store.YES));
     writer.addDocument(doc);
     writer.close();
 
     writer = new RandomIndexWriter(random(), dir,
                                    new MockAnalyzer(random(), MockTokenizer.WHITESPACE, true));
     doc = new Document();
-    doc.add(new Field("hasMaybepayload2", "here we go", TextField.TYPE_STORED));
+    doc.add(new TextField("hasMaybepayload2", "here we go", Field.Store.YES));
     writer.addDocument(doc);
     writer.addDocument(doc);
     writer.forceMerge(1);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java Sun Jun 10 17:42:19 2012
@@ -61,7 +61,7 @@ public class TestPostingsOffsets extends
     RandomIndexWriter w = new RandomIndexWriter(random(), dir, iwc);
     Document doc = new Document();
 
-    FieldType ft = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
     ft.setIndexOptions(FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
     if (random().nextBoolean()) {
       ft.setStoreTermVectors(true);
@@ -142,7 +142,7 @@ public class TestPostingsOffsets extends
       Document doc = new Document();
       doc.add(new Field("numbers", English.intToEnglish(i), ft));
       doc.add(new Field("oddeven", (i % 2) == 0 ? "even" : "odd", ft));
-      doc.add(new StringField("id", "" + i));
+      doc.add(new StringField("id", "" + i, Field.Store.NO));
       w.addDocument(doc);
     }
     
@@ -224,7 +224,7 @@ public class TestPostingsOffsets extends
     final int numDocs = atLeast(20);
     //final int numDocs = atLeast(5);
 
-    FieldType ft = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
 
     // TODO: randomize what IndexOptions we use; also test
     // changing this up in one IW buffered segment...:
@@ -237,7 +237,7 @@ public class TestPostingsOffsets extends
 
     for(int docCount=0;docCount<numDocs;docCount++) {
       Document doc = new Document();
-      doc.add(new IntField("id", docCount));
+      doc.add(new IntField("id", docCount, Field.Store.NO));
       List<Token> tokens = new ArrayList<Token>();
       final int numTokens = atLeast(100);
       //final int numTokens = atLeast(20);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java Sun Jun 10 17:42:19 2012
@@ -21,7 +21,6 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
-import org.apache.lucene.document.StringField;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.TermRangeQuery;
 import org.apache.lucene.store.AlreadyClosedException;
@@ -42,7 +41,7 @@ public class TestReaderClosed extends Lu
         .setMaxBufferedDocs(_TestUtil.nextInt(random(), 50, 1000)));
     
     Document doc = new Document();
-    Field field = newField("field", "", StringField.TYPE_UNSTORED);
+    Field field = newStringField("field", "", Field.Store.NO);
     doc.add(field);
 
     // we generate aweful prefixes: good for testing.

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollback.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollback.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollback.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollback.java Sun Jun 10 17:42:19 2012
@@ -19,7 +19,7 @@ package org.apache.lucene.index;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.StringField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
 
@@ -31,7 +31,7 @@ public class TestRollback extends Lucene
     RandomIndexWriter rw = new RandomIndexWriter(random(), dir);
     for (int i = 0; i < 5; i++) {
       Document doc = new Document();
-      doc.add(newField("pk", Integer.toString(i), StringField.TYPE_STORED));
+      doc.add(newStringField("pk", Integer.toString(i), Field.Store.YES));
       rw.addDocument(doc);
     }
     rw.close();
@@ -42,8 +42,8 @@ public class TestRollback extends Lucene
     for (int i = 0; i < 3; i++) {
       Document doc = new Document();
       String value = Integer.toString(i);
-      doc.add(newField("pk", value, StringField.TYPE_STORED));
-      doc.add(newField("text", "foo", StringField.TYPE_STORED));
+      doc.add(newStringField("pk", value, Field.Store.YES));
+      doc.add(newStringField("text", "foo", Field.Store.YES));
       w.updateDocument(new Term("pk", value), doc);
     }
     w.rollback();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollingUpdates.java Sun Jun 10 17:42:19 2012
@@ -134,7 +134,7 @@ public class TestRollingUpdates extends 
         DirectoryReader open = null;
         for (int i = 0; i < num; i++) {
           Document doc = new Document();// docs.nextDoc();
-          doc.add(newField("id", "test", StringField.TYPE_UNSTORED));
+          doc.add(newStringField("id", "test", Field.Store.NO));
           writer.updateDocument(new Term("id", "test"), doc);
           if (random().nextInt(3) == 0) {
             if (open == null) {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentTermDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentTermDocs.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentTermDocs.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentTermDocs.java Sun Jun 10 17:42:19 2012
@@ -21,7 +21,7 @@ import java.io.IOException;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BytesRef;
@@ -280,7 +280,7 @@ public class TestSegmentTermDocs extends
   private void addDoc(IndexWriter writer, String value) throws IOException
   {
       Document doc = new Document();
-      doc.add(newField("content", value, TextField.TYPE_UNSTORED));
+      doc.add(newTextField("content", value, Field.Store.NO));
       writer.addDocument(doc);
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentTermEnum.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentTermEnum.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentTermEnum.java Sun Jun 10 17:42:19 2012
@@ -19,13 +19,13 @@ package org.apache.lucene.index;
 
 import java.io.IOException;
 
+import org.apache.lucene.document.Field;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util._TestUtil;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.store.Directory;
 
@@ -135,7 +135,7 @@ public class TestSegmentTermEnum extends
   private void addDoc(IndexWriter writer, String value) throws IOException
   {
     Document doc = new Document();
-    doc.add(newField("content", value, TextField.TYPE_UNSTORED));
+    doc.add(newTextField("content", value, Field.Store.NO));
     writer.addDocument(doc);
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java Sun Jun 10 17:42:19 2012
@@ -36,7 +36,7 @@ public class TestSizeBoundedForceMerge e
     for (int i = 0; i < numDocs; i++) {
       Document doc = new Document();
       if (withID) {
-        doc.add(new Field("id", "" + i, StringField.TYPE_UNSTORED));
+        doc.add(new StringField("id", "" + i, Field.Store.NO));
       }
       writer.addDocument(doc);
     }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestStressAdvance.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestStressAdvance.java?rev=1348630&r1=1348629&r2=1348630&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestStressAdvance.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestStressAdvance.java Sun Jun 10 17:42:19 2012
@@ -37,9 +37,9 @@ public class TestStressAdvance extends L
       RandomIndexWriter w = new RandomIndexWriter(random(), dir);
       final Set<Integer> aDocs = new HashSet<Integer>();
       final Document doc = new Document();
-      final Field f = newField("field", "", StringField.TYPE_UNSTORED);
+      final Field f = newStringField("field", "", Field.Store.NO);
       doc.add(f);
-      final Field idField = newField("id", "", StringField.TYPE_STORED);
+      final Field idField = newStringField("id", "", Field.Store.YES);
       doc.add(idField);
       int num = atLeast(4097);
       if (VERBOSE) {



Mime
View raw message