lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1161533 [1/3] - in /lucene/dev/branches/fieldtype_conflicted: lucene/contrib/demo/src/java/org/apache/lucene/demo/ lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/ lucene/contrib/highlighter/src/test/org/apache/lucen...
Date Thu, 25 Aug 2011 12:23:35 GMT
Author: mikemccand
Date: Thu Aug 25 12:23:31 2011
New Revision: 1161533

URL: http://svn.apache.org/viewvc?rev=1161533&view=rev
Log:
LUCENE-2308: final cleanup before landing

Modified:
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexFiles.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorVisitor.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribFieldsReader.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribParallelReader.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestMultiPassIndexSplitter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/ChainedFilterTest.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/TestSlowCollationMethods.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java
    lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/BinaryField.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/Document.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCache.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeFilter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeQuery.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/Similarity.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/index/DocHelper.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/TestDemo.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/Test2BTerms.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAtomicUpdate.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestCheckIndex.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestConsistentFieldNumbers.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestCrash.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestDirectoryReader.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestDocumentWriter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestGlobalFieldNumbers.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexReader.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexReaderClone.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexReaderDelete.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexReaderOnDiskFull.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexWriterMerging.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIndexableField.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestLazyProxSkipping.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestParallelReader.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestPayloads.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestRollback.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestSameTokenSamePosition.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestSegmentInfo.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestStressAdvance.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestTransactionRollback.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/values/TestDocValuesIndexing.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestBooleanOr.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestBooleanScorer.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestCachingSpanFilter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestDateFilter.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestRegexpRandom.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/TestTopDocsMerge.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/spans/TestBasics.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java
    lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/search/spans/TestSpansAdvanced.java
    lucene/dev/branches/fieldtype_conflicted/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
    lucene/dev/branches/fieldtype_conflicted/modules/facet/src/java/org/apache/lucene/facet/taxonomy/lucene/LuceneTaxonomyWriter.java
    lucene/dev/branches/fieldtype_conflicted/modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
    lucene/dev/branches/fieldtype_conflicted/modules/queries/src/test/org/apache/lucene/queries/function/FunctionTestSetup.java
    lucene/dev/branches/fieldtype_conflicted/modules/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java
    lucene/dev/branches/fieldtype_conflicted/modules/queryparser/src/test/org/apache/lucene/queryparser/complexPhrase/TestComplexPhraseQuery.java
    lucene/dev/branches/fieldtype_conflicted/modules/queryparser/src/test/org/apache/lucene/queryparser/surround/query/SingleFieldTestDb.java
    lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java
    lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/search/TestSort.java

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexFiles.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexFiles.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexFiles.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/demo/src/java/org/apache/lucene/demo/IndexFiles.java Thu Aug 25 12:23:31 2011
@@ -176,8 +176,6 @@ public class IndexFiles {
           // field that is indexed (i.e. searchable), but don't tokenize 
           // the field into separate words and don't index term frequency
           // or positional information:
-          FieldType ft = new FieldType(TextField.TYPE_STORED);
-          ft.setIndexOptions(IndexOptions.DOCS_ONLY);
           Field pathField = new Field("path", StringField.TYPE_STORED, file.getPath());
           doc.add(pathField);
 

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterPhraseTest.java Thu Aug 25 12:23:31 2011
@@ -230,8 +230,7 @@ public class HighlighterPhraseTest exten
     try {
       final Document document = new Document();
 
-      FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-      customType.setStored(true);
+      FieldType customType = new FieldType(TextField.TYPE_STORED);
       customType.setStoreTermVectorOffsets(true);
       customType.setStoreTermVectors(true);
       document.add(new Field(FIELD, customType, TEXT));

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java Thu Aug 25 12:23:31 2011
@@ -1637,9 +1637,7 @@ public class HighlighterTest extends Bas
   
   private Document doc( String f, String v ){
     Document doc = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    doc.add( new Field( f, customType, v));
+    doc.add( new Field( f, TextField.TYPE_STORED, v));
     return doc;
   }
   
@@ -1754,23 +1752,21 @@ public class HighlighterTest extends Bas
       addDoc(writer, text);
     }
     Document doc = new Document();
-    FieldType storedNumericType = new FieldType(NumericField.TYPE_UNSTORED);
-    storedNumericType.setStored(true);
-    NumericField nfield = new NumericField(NUMERIC_FIELD_NAME, storedNumericType);
+    NumericField nfield = new NumericField(NUMERIC_FIELD_NAME, NumericField.TYPE_STORED);
     nfield.setIntValue(1);
     doc.add(nfield);
     writer.addDocument(doc, analyzer);
-    nfield = new NumericField(NUMERIC_FIELD_NAME, storedNumericType);
+    nfield = new NumericField(NUMERIC_FIELD_NAME, NumericField.TYPE_STORED);
     nfield.setIntValue(3);
     doc = new Document();
     doc.add(nfield);
     writer.addDocument(doc, analyzer);
-    nfield = new NumericField(NUMERIC_FIELD_NAME, storedNumericType);
+    nfield = new NumericField(NUMERIC_FIELD_NAME, NumericField.TYPE_STORED);
     nfield.setIntValue(5);
     doc = new Document();
     doc.add(nfield);
     writer.addDocument(doc, analyzer);
-    nfield = new NumericField(NUMERIC_FIELD_NAME, storedNumericType);
+    nfield = new NumericField(NUMERIC_FIELD_NAME, NumericField.TYPE_STORED);
     nfield.setIntValue(7);
     doc = new Document();
     doc.add(nfield);
@@ -1792,9 +1788,7 @@ public class HighlighterTest extends Bas
   private void addDoc(IndexWriter writer, String text) throws IOException {
     Document d = new Document();
 
-    FieldType storedType = new FieldType(TextField.TYPE_UNSTORED);
-    storedType.setStored(true);
-    Field f = new Field(FIELD_NAME, storedType, text);
+    Field f = new Field(FIELD_NAME, TextField.TYPE_STORED, text);
     d.add(f);
     writer.addDocument(d);
 

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java Thu Aug 25 12:23:31 2011
@@ -359,11 +359,10 @@ public abstract class AbstractTestCase e
     IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(
         TEST_VERSION_CURRENT, analyzer).setOpenMode(OpenMode.CREATE));
     Document doc = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
+    FieldType customType = new FieldType(TextField.TYPE_STORED);
     customType.setStoreTermVectors(true);
     customType.setStoreTermVectorOffsets(true);
     customType.setStoreTermVectorPositions(true);
-    customType.setStored(true);
     for( String value: values ) {
       doc.add( new Field( F, customType, value ) );
     }

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java Thu Aug 25 12:23:31 2011
@@ -206,8 +206,7 @@ public class TestIndicesEquals extends L
 
 
   private void assembleDocument(Document document, int i) {
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
+    FieldType customType = new FieldType(TextField.TYPE_STORED);
     customType.setStoreTermVectors(true);
     customType.setStoreTermVectorOffsets(true);
     customType.setStoreTermVectorPositions(true);
@@ -218,8 +217,7 @@ public class TestIndicesEquals extends L
       document.add(new Field("b0", customType, i + " All work and no play makes Jack a dull boy"));
 
       //document.add(new Field("b1", i + " All work and no play makes Jack a dull boy", Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS, Field.TermVector.NO));
-      FieldType customType2 = new FieldType(TextField.TYPE_UNSTORED);
-      customType2.setStored(true);
+      FieldType customType2 = new FieldType(TextField.TYPE_STORED);
       customType2.setTokenized(false);
       customType2.setOmitNorms(true);
       document.add(new Field("b1", customType2, i + " All work and no play makes Jack a dull boy"));
@@ -230,8 +228,7 @@ public class TestIndicesEquals extends L
       document.add(new Field("b1", customType3, i + " All work and no play makes Jack a dull boy"));
       
       //document.add(new Field("b3", i + " All work and no play makes Jack a dull boy", Field.Store.YES, Field.Index.NO, Field.TermVector.NO));
-      FieldType customType4 = new FieldType(TextField.TYPE_UNSTORED);
-      customType4.setStored(true);
+      FieldType customType4 = new FieldType(TextField.TYPE_STORED);
       customType4.setIndexed(false);
       customType4.setTokenized(false);
       document.add(new Field("b1", customType4, i + " All work and no play makes Jack a dull boy"));

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorVisitor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorVisitor.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorVisitor.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/java/org/apache/lucene/document/FieldSelectorVisitor.java Thu Aug 25 12:23:31 2011
@@ -322,4 +322,4 @@ public class FieldSelectorVisitor extend
       }
     }
   }
-}
\ No newline at end of file
+}

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribFieldsReader.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribFieldsReader.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribFieldsReader.java Thu Aug 25 12:23:31 2011
@@ -316,4 +316,4 @@ public class TestContribFieldsReader ext
     assertEquals((byte) (size>>> 8), sizebytes[2]);
     assertEquals((byte)  size      , sizebytes[3]);
   }
-}
\ No newline at end of file
+}

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribIndexReader.java Thu Aug 25 12:23:31 2011
@@ -30,6 +30,7 @@ import org.apache.lucene.document.FieldS
 import org.apache.lucene.document.FieldSelectorVisitor;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.SetBasedFieldSelector;
+import org.apache.lucene.document.StringField;
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.store.Directory;
@@ -52,17 +53,10 @@ public class TestContribIndexReader exte
   static void addDocumentWithFields(IndexWriter writer) throws IOException {
     Document doc = new Document();
         
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    customType.setTokenized(false);
-
-    FieldType customType2 = new FieldType(TextField.TYPE_UNSTORED);
-    customType2.setStored(true);
-
     FieldType customType3 = new FieldType();
     customType3.setStored(true);
-    doc.add(newField("keyword", "test1", customType));
-    doc.add(newField("text", "test1", customType2));
+    doc.add(newField("keyword", "test1", StringField.TYPE_STORED));
+    doc.add(newField("text", "test1", TextField.TYPE_STORED));
     doc.add(newField("unindexed", "test1", customType3));
     doc.add(new TextField("unstored","test1"));
     writer.addDocument(doc);
@@ -72,17 +66,10 @@ public class TestContribIndexReader exte
   static void addDocumentWithDifferentFields(IndexWriter writer) throws IOException {
     Document doc = new Document();
       
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    customType.setTokenized(false);
-
-    FieldType customType2 = new FieldType(TextField.TYPE_UNSTORED);
-    customType2.setStored(true);
-
     FieldType customType3 = new FieldType();
     customType3.setStored(true);
-    doc.add(newField("keyword2", "test1", customType));
-    doc.add(newField("text2", "test1", customType2));
+    doc.add(newField("keyword2", "test1", StringField.TYPE_STORED));
+    doc.add(newField("text2", "test1", TextField.TYPE_STORED));
     doc.add(newField("unindexed2", "test1", customType3));
     doc.add(new TextField("unstored2","test1"));
     writer.addDocument(doc);
@@ -90,25 +77,19 @@ public class TestContribIndexReader exte
 
   static void addDocumentWithTermVectorFields(IndexWriter writer) throws IOException {
     Document doc = new Document();
-    FieldType customType4 = new FieldType(TextField.TYPE_UNSTORED);
-    customType4.setStored(true);
-    FieldType customType5 = new FieldType(TextField.TYPE_UNSTORED);
-    customType5.setStored(true);
+    FieldType customType5 = new FieldType(TextField.TYPE_STORED);
     customType5.setStoreTermVectors(true);
-    FieldType customType6 = new FieldType(TextField.TYPE_UNSTORED);
-    customType6.setStored(true);
+    FieldType customType6 = new FieldType(TextField.TYPE_STORED);
     customType6.setStoreTermVectors(true);
     customType6.setStoreTermVectorOffsets(true);
-    FieldType customType7 = new FieldType(TextField.TYPE_UNSTORED);
-    customType7.setStored(true);
+    FieldType customType7 = new FieldType(TextField.TYPE_STORED);
     customType7.setStoreTermVectors(true);
     customType7.setStoreTermVectorPositions(true);
-    FieldType customType8 = new FieldType(TextField.TYPE_UNSTORED);
-    customType8.setStored(true);
+    FieldType customType8 = new FieldType(TextField.TYPE_STORED);
     customType8.setStoreTermVectors(true);
     customType8.setStoreTermVectorOffsets(true);
     customType8.setStoreTermVectorPositions(true);
-    doc.add(newField("tvnot","tvnot",customType4));
+    doc.add(newField("tvnot","tvnot",TextField.TYPE_STORED));
     doc.add(newField("termvector","termvector",customType5));
     doc.add(newField("tvoffset","tvoffset", customType6));
     doc.add(newField("tvposition","tvposition", customType7));

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribParallelReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribParallelReader.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribParallelReader.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestContribParallelReader.java Thu Aug 25 12:23:31 2011
@@ -62,18 +62,16 @@ public class TestContribParallelReader e
     dir = newDirectory();
     IndexWriter w = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     Document d1 = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    d1.add(newField("f1", "v1", customType));
-    d1.add(newField("f2", "v1", customType));
-    d1.add(newField("f3", "v1", customType));
-    d1.add(newField("f4", "v1", customType));
+    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));
     w.addDocument(d1);
     Document d2 = new Document();
-    d2.add(newField("f1", "v2", customType));
-    d2.add(newField("f2", "v2", customType));
-    d2.add(newField("f3", "v2", customType));
-    d2.add(newField("f4", "v2", customType));
+    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));
     w.addDocument(d2);
     w.close();
 
@@ -124,14 +122,12 @@ public class TestContribParallelReader e
     Directory dir1 = newDirectory();
     IndexWriter w1 = new IndexWriter(dir1, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     Document d1 = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    d1.add(newField("f1", "v1", customType));
-    d1.add(newField("f2", "v1", customType));
+    d1.add(newField("f1", "v1", TextField.TYPE_STORED));
+    d1.add(newField("f2", "v1", TextField.TYPE_STORED));
     w1.addDocument(d1);
     Document d2 = new Document();
-    d2.add(newField("f1", "v2", customType));
-    d2.add(newField("f2", "v2", customType));
+    d2.add(newField("f1", "v2", TextField.TYPE_STORED));
+    d2.add(newField("f2", "v2", TextField.TYPE_STORED));
     w1.addDocument(d2);
     w1.close();
     return dir1;
@@ -139,16 +135,14 @@ public class TestContribParallelReader e
 
   private Directory getDir2(Random random) throws IOException {
     Directory dir2 = newDirectory();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
     IndexWriter w2 = new IndexWriter(dir2, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     Document d3 = new Document();
-    d3.add(newField("f3", "v1", customType));
-    d3.add(newField("f4", "v1", customType));
+    d3.add(newField("f3", "v1", TextField.TYPE_STORED));
+    d3.add(newField("f4", "v1", TextField.TYPE_STORED));
     w2.addDocument(d3);
     Document d4 = new Document();
-    d4.add(newField("f3", "v2", customType));
-    d4.add(newField("f4", "v2", customType));
+    d4.add(newField("f3", "v2", TextField.TYPE_STORED));
+    d4.add(newField("f4", "v2", TextField.TYPE_STORED));
     w2.addDocument(d4);
     w2.close();
     return dir2;

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java Thu Aug 25 12:23:31 2011
@@ -24,6 +24,7 @@ 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.IndexReader.AtomicReaderContext;
 import org.apache.lucene.search.Collector;
@@ -68,20 +69,14 @@ public class TestFieldNormModifier exten
     for (int i = 0; i < NUM_DOCS; i++) {
       Document d = new Document();
       
-      FieldType storedTextType = new FieldType(TextField.TYPE_UNSTORED);
-      storedTextType.setStored(true);
-      d.add(newField("field", "word", storedTextType));
-
-      FieldType storedTextType2 = new FieldType(TextField.TYPE_UNSTORED);
-      storedTextType2.setStored(true);
-      storedTextType2.setTokenized(false);
-      storedTextType2.setOmitNorms(true);
-      d.add(newField("nonorm", "word", storedTextType2));
-      d.add(newField("untokfield", "20061212 20071212", storedTextType));
+      d.add(newField("field", "word", TextField.TYPE_STORED));
+
+      d.add(newField("nonorm", "word", StringField.TYPE_STORED));
+      d.add(newField("untokfield", "20061212 20071212", TextField.TYPE_STORED));
       
       for (int j = 1; j <= i; j++) {
-        d.add(newField("field", "crap", storedTextType));
-        d.add(newField("nonorm", "more words", storedTextType2));
+        d.add(newField("field", "crap", TextField.TYPE_STORED));
+        d.add(newField("nonorm", "more words", StringField.TYPE_STORED));
       }
       writer.addDocument(d);
     }

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestMultiPassIndexSplitter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestMultiPassIndexSplitter.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestMultiPassIndexSplitter.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/TestMultiPassIndexSplitter.java Thu Aug 25 12:23:31 2011
@@ -20,10 +20,11 @@ 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.store.Directory;
-import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.LuceneTestCase;
 
 public class TestMultiPassIndexSplitter extends LuceneTestCase {
   IndexReader input;
@@ -38,13 +39,8 @@ public class TestMultiPassIndexSplitter 
     Document doc;
     for (int i = 0; i < NUM_DOCS; i++) {
       doc = new Document();
-      FieldType storedTextType = new FieldType(TextField.TYPE_UNSTORED);
-      storedTextType.setStored(true);
-      storedTextType.setTokenized(false);
-      FieldType storedTextType2 = new FieldType(TextField.TYPE_UNSTORED);
-      storedTextType.setStored(true);
-      doc.add(newField("id", i + "", storedTextType));
-      doc.add(newField("f", i + " " + i, storedTextType2));
+      doc.add(newField("id", i + "", StringField.TYPE_STORED));
+      doc.add(newField("f", i + " " + i, TextField.TYPE_STORED));
       w.addDocument(doc);
     }
     w.close();

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java Thu Aug 25 12:23:31 2011
@@ -140,8 +140,7 @@ public class TestAppendingCodec extends 
     ((TieredMergePolicy)cfg.getMergePolicy()).setUseCompoundFile(false);
     IndexWriter writer = new IndexWriter(dir, cfg);
     Document doc = new Document();
-    FieldType storedTextType = new FieldType(TextField.TYPE_UNSTORED);
-    storedTextType.setStored(true);
+    FieldType storedTextType = new FieldType(TextField.TYPE_STORED);
     storedTextType.setStoreTermVectors(true);
     storedTextType.setStoreTermVectorPositions(true);
     storedTextType.setStoreTermVectorOffsets(true);

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java Thu Aug 25 12:23:31 2011
@@ -201,15 +201,13 @@ public class TestHighFreqTerms extends L
     /**
      * Generate 10 documents where term n  has a docFreq of n and a totalTermFreq of n*2 (squared). 
      */
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
     for (int i = 1; i <= 10; i++) {
       Document doc = new Document();
       String content = getContent(i);
     
-      doc.add(newField(random, "FIELD_1", content, customType));
+      doc.add(newField(random, "FIELD_1", content, TextField.TYPE_STORED));
       //add a different field
-      doc.add(newField(random, "different_field", "diff", customType));
+      doc.add(newField(random, "different_field", "diff", TextField.TYPE_STORED));
       writer.addDocument(doc);
     }
     
@@ -217,7 +215,7 @@ public class TestHighFreqTerms extends L
     //highest freq terms for a specific field.
     for (int i = 1; i <= 10; i++) {
       Document doc = new Document();
-      doc.add(newField(random, "different_field", "diff", customType));
+      doc.add(newField(random, "different_field", "diff", TextField.TYPE_STORED));
       writer.addDocument(doc);
     }
     // add some docs where tf < df so we can see if sorting works
@@ -228,7 +226,7 @@ public class TestHighFreqTerms extends L
     for (int i = 0; i < highTF; i++) {
       content += "highTF ";
     }
-    doc.add(newField(random, "FIELD_1", content, customType));
+    doc.add(newField(random, "FIELD_1", content, TextField.TYPE_STORED));
     writer.addDocument(doc);
     // highTF medium df =5
     int medium_df = 5;
@@ -239,7 +237,7 @@ public class TestHighFreqTerms extends L
       for (int j = 0; j < tf; j++) {
         newcontent += "highTFmedDF ";
       }
-      newdoc.add(newField(random, "FIELD_1", newcontent, customType));
+      newdoc.add(newField(random, "FIELD_1", newcontent, TextField.TYPE_STORED));
       writer.addDocument(newdoc);
     }
     // add a doc with high tf in field different_field
@@ -249,7 +247,7 @@ public class TestHighFreqTerms extends L
     for (int i = 0; i < targetTF; i++) {
       content += "TF150 ";
     }
-    doc.add(newField(random, "different_field", content, customType));
+    doc.add(newField(random, "different_field", content, TextField.TYPE_STORED));
     writer.addDocument(doc);
     writer.close();
     

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java Thu Aug 25 12:23:31 2011
@@ -23,11 +23,12 @@ 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.FieldInvertState;
 import org.apache.lucene.index.FieldNormModifier;
-import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexReader.AtomicReaderContext;
+import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.MultiNorms;
 import org.apache.lucene.index.Term;
@@ -72,17 +73,12 @@ public class TestLengthNormModifier exte
 	
 	for (int i = 0; i < NUM_DOCS; i++) {
 	    Document d = new Document();
-	    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-	    customType.setStored(true);
-	    d.add(newField("field", "word", customType));
-      FieldType customType2 = new FieldType(TextField.TYPE_UNSTORED);
-      customType2.setStored(true);
-      customType2.setOmitNorms(true);
-	    d.add(newField("nonorm", "word", customType2));
+	    d.add(newField("field", "word", TextField.TYPE_STORED));
+	    d.add(newField("nonorm", "word", StringField.TYPE_STORED));
 		
 	    for (int j = 1; j <= i; j++) {
-		d.add(newField("field", "crap", customType));
-		d.add(newField("nonorm", "more words", customType2));
+		d.add(newField("field", "crap", TextField.TYPE_STORED));
+		d.add(newField("nonorm", "more words", StringField.TYPE_STORED));
 	    }
 	    writer.addDocument(d);
 	}

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/ChainedFilterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/ChainedFilterTest.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/ChainedFilterTest.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/ChainedFilterTest.java Thu Aug 25 12:23:31 2011
@@ -22,6 +22,7 @@ import java.util.GregorianCalendar;
 
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.FieldType;
+import org.apache.lucene.document.StringField;
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
@@ -30,10 +31,10 @@ import org.apache.lucene.search.BooleanC
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.search.CachingWrapperFilter;
 import org.apache.lucene.search.Filter;
+import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.MatchAllDocsQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.QueryWrapperFilter;
-import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.search.TermRangeFilter;
 import org.apache.lucene.search.TopDocs;
@@ -63,12 +64,9 @@ public class ChainedFilterTest extends L
 
     for (int i = 0; i < MAX; i++) {
       Document doc = new Document();
-      FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-      customType.setStored(true);
-      customType.setTokenized(false);
-      doc.add(newField("key", "" + (i + 1), customType));
-      doc.add(newField("owner", (i < MAX / 2) ? "bob" : "sue", customType));
-      doc.add(newField("date", cal.getTime().toString(), customType));
+      doc.add(newField("key", "" + (i + 1), StringField.TYPE_STORED));
+      doc.add(newField("owner", (i < MAX / 2) ? "bob" : "sue", StringField.TYPE_STORED));
+      doc.add(newField("date", cal.getTime().toString(), StringField.TYPE_STORED));
       writer.addDocument(doc);
 
       cal.add(Calendar.DATE, 1);

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/TestSlowCollationMethods.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/TestSlowCollationMethods.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/TestSlowCollationMethods.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/queries/src/test/org/apache/lucene/search/TestSlowCollationMethods.java Thu Aug 25 12:23:31 2011
@@ -7,6 +7,7 @@ import java.util.Locale;
 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.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
@@ -58,11 +59,7 @@ public class TestSlowCollationMethods ex
     for (int i = 0; i < numDocs; i++) {
       Document doc = new Document();
       String value = _TestUtil.randomUnicodeString(random);
-      FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-      customType.setStored(true);
-      customType.setOmitNorms(true);
-      customType.setTokenized(false);
-      Field field = newField("field", value, customType);
+      Field field = newField("field", value, StringField.TYPE_STORED);
       doc.add(field);
       iw.addDocument(doc);
     }

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java Thu Aug 25 12:23:31 2011
@@ -26,9 +26,10 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.NumericField;
+import org.apache.lucene.document.StringField;
 import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexReader.AtomicReaderContext;
+import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Query;
@@ -96,29 +97,21 @@ public class TestCartesian extends Lucen
     
     Document doc = new Document();
 
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    doc.add(newField("name", name, customType));
+    doc.add(newField("name", name, TextField.TYPE_STORED));
     
     // convert the lat / long to lucene fields
-    FieldType customType2 = new FieldType(NumericField.TYPE_UNSTORED);
-    customType2.setStored(true);
-    doc.add(new NumericField(latField, Integer.MAX_VALUE, customType2).setDoubleValue(lat));
-    doc.add(new NumericField(lngField, Integer.MAX_VALUE, customType2).setDoubleValue(lng));
+    doc.add(new NumericField(latField, Integer.MAX_VALUE, NumericField.TYPE_STORED).setDoubleValue(lat));
+    doc.add(new NumericField(lngField, Integer.MAX_VALUE, NumericField.TYPE_STORED).setDoubleValue(lng));
     
     // add a default meta field to make searching all documents easy 
-    doc.add(newField("metafile", "doc", customType));
+    doc.add(newField("metafile", "doc", TextField.TYPE_STORED));
     
     int ctpsize = ctps.size();
-    FieldType customType3 = new FieldType(TextField.TYPE_UNSTORED);
-    customType3.setStored(true);
-    customType3.setTokenized(false);
-    customType3.setOmitNorms(true);
     for (int i =0; i < ctpsize; i++){
       CartesianTierPlotter ctp = ctps.get(i);
-      doc.add(new NumericField(ctp.getTierFieldName(), Integer.MAX_VALUE, customType).setDoubleValue(ctp.getTierBoxId(lat,lng)));
+      doc.add(new NumericField(ctp.getTierFieldName(), Integer.MAX_VALUE, TextField.TYPE_STORED).setDoubleValue(ctp.getTierBoxId(lat,lng)));
       
-      doc.add(newField(geoHashPrefix, GeoHashUtils.encode(lat,lng), customType3));
+      doc.add(newField(geoHashPrefix, GeoHashUtils.encode(lat,lng), StringField.TYPE_STORED));
     }
     writer.addDocument(doc);
     

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java Thu Aug 25 12:23:31 2011
@@ -65,18 +65,14 @@ public class TestDistance extends Lucene
     
     Document doc = new Document();
 
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    doc.add(newField("name", name, customType));
+    doc.add(newField("name", name, TextField.TYPE_STORED));
     
     // convert the lat / long to lucene fields
-    FieldType customType2 = new FieldType(NumericField.TYPE_UNSTORED);
-    customType.setStored(true);
-    doc.add(new NumericField(latField, Integer.MAX_VALUE, customType2).setDoubleValue(lat));
-    doc.add(new NumericField(lngField, Integer.MAX_VALUE, customType2).setDoubleValue(lng));
+    doc.add(new NumericField(latField, Integer.MAX_VALUE, NumericField.TYPE_STORED).setDoubleValue(lat));
+    doc.add(new NumericField(lngField, Integer.MAX_VALUE, NumericField.TYPE_STORED).setDoubleValue(lng));
     
     // add a default meta field to make searching all documents easy 
-    doc.add(newField("metafile", "doc", customType));
+    doc.add(newField("metafile", "doc", TextField.TYPE_STORED));
     writer.addDocument(doc);
     
   }

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java Thu Aug 25 12:23:31 2011
@@ -59,16 +59,14 @@ public class TestParser extends LuceneTe
       dir=newDirectory();
       IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(Version.LUCENE_40, analyzer));
       String line = d.readLine();   
-      FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-      customType.setStored(true);
       while(line!=null)
       {
         int endOfDate=line.indexOf('\t');
         String date=line.substring(0,endOfDate).trim();
         String content=line.substring(endOfDate).trim();
         Document doc = new Document();
-        doc.add(newField("date",date,customType));
-        doc.add(newField("contents",content,customType));
+        doc.add(newField("date",date,TextField.TYPE_STORED));
+        doc.add(newField("contents",content,TextField.TYPE_STORED));
         NumericField numericField = new NumericField("date2");
         numericField.setIntValue(Integer.valueOf(date));
         doc.add(numericField);

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java Thu Aug 25 12:23:31 2011
@@ -1,5 +1,22 @@
 package org.apache.lucene.xmlparser;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.io.IOException;
 import java.util.Locale;
 import java.util.Properties;
@@ -24,22 +41,6 @@ import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
 /**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
  * This class illustrates how form input (such as from a web page or Swing gui) can be
  * turned into Lucene queries using a choice of XSL templates for different styles of queries.
  */
@@ -130,15 +131,13 @@ public class TestQueryTemplateManager ex
 	{
 		org.apache.lucene.document.Document result=new org.apache.lucene.document.Document();
 		StringTokenizer st=new StringTokenizer(nameValuePairs,"\t=");
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
 		while(st.hasMoreTokens())
 		{
 			String name=st.nextToken().trim();
 			if(st.hasMoreTokens())
 			{
 				String value=st.nextToken().trim();
-				result.add(newField(name,value,customType));
+				result.add(newField(name,value,TextField.TYPE_STORED));
 			}
 		}
 		return result;

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/BinaryField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/BinaryField.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/BinaryField.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/BinaryField.java Thu Aug 25 12:23:31 2011
@@ -36,7 +36,7 @@ public final class BinaryField extends F
   }
 
   public BinaryField(String name, BytesRef bytes) {
-    super(name, BinaryField.TYPE_STORED, bytes.bytes, bytes.offset, bytes.length);
+    super(name, BinaryField.TYPE_STORED, bytes);
   }
   
   public BinaryField(String name, FieldType custom, byte[] value) {

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/Document.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/Document.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/Document.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/document/Document.java Thu Aug 25 12:23:31 2011
@@ -214,7 +214,7 @@ public final class Document implements I
    * method returns the first value added. If only binary fields with this name
    * exist, returns null.
    * For {@link NumericField} it returns the string value of the number. If you want
-   * the actual {@code NumericField} instance back, use {@link #getFieldable}.
+   * the actual {@code NumericField} instance back, use {@link #getField}.
    */
   public final String get(String name) {
     for (IndexableField field : fields) {

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCache.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCache.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCache.java Thu Aug 25 12:23:31 2011
@@ -24,7 +24,7 @@ import org.apache.lucene.search.cache.Ca
 import org.apache.lucene.util.NumericUtils;
 import org.apache.lucene.util.RamUsageEstimator;
 import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.document.NumericField;
+import org.apache.lucene.document.NumericField; // for javadocs
 import org.apache.lucene.analysis.NumericTokenStream; // for javadocs
 import org.apache.lucene.util.packed.PackedInts;
 

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java Thu Aug 25 12:23:31 2011
@@ -23,7 +23,7 @@ import org.apache.lucene.index.IndexRead
 import org.apache.lucene.util.NumericUtils;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.document.NumericField;
+import org.apache.lucene.document.NumericField; // for javadocs
 
 /**
  * A range filter built on top of a cached single term field (in {@link FieldCache}).

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeFilter.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeFilter.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeFilter.java Thu Aug 25 12:23:31 2011
@@ -18,7 +18,7 @@ package org.apache.lucene.search;
  */
 
 import org.apache.lucene.analysis.NumericTokenStream; // for javadocs
-import org.apache.lucene.document.NumericField;
+import org.apache.lucene.document.NumericField; // for javadocs
 import org.apache.lucene.util.NumericUtils; // for javadocs
 
 /**

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeQuery.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeQuery.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/NumericRangeQuery.java Thu Aug 25 12:23:31 2011
@@ -22,7 +22,7 @@ import java.util.LinkedList;
 import java.util.Comparator;
 
 import org.apache.lucene.analysis.NumericTokenStream; // for javadocs
-import org.apache.lucene.document.NumericField;
+import org.apache.lucene.document.NumericField; // for javadocs
 import org.apache.lucene.util.NumericUtils;
 import org.apache.lucene.util.ToStringUtils;
 import org.apache.lucene.index.Terms;

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/Similarity.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/Similarity.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/Similarity.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/java/org/apache/lucene/search/Similarity.java Thu Aug 25 12:23:31 2011
@@ -221,4 +221,4 @@ public abstract class Similarity {
      */
     public abstract void normalize(float queryNorm, float topLevelBoost);
   }
-}
\ No newline at end of file
+}

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/index/DocHelper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/index/DocHelper.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/index/DocHelper.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/index/DocHelper.java Thu Aug 25 12:23:31 2011
@@ -29,6 +29,7 @@ import org.apache.lucene.analysis.MockTo
 import org.apache.lucene.document.BinaryField;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
+import org.apache.lucene.document.StringField;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.TextField;
@@ -74,15 +75,11 @@ class DocHelper {
     textField3 = new Field(TEXT_FIELD_3_KEY, customType3, FIELD_3_TEXT);
   }
 
-  public static final FieldType customType4;
   public static final String KEYWORD_TEXT = "Keyword";
   public static final String KEYWORD_FIELD_KEY = "keyField";
   public static Field keyField;
   static {
-    customType4 = new FieldType(TextField.TYPE_UNSTORED);
-    customType4.setStored(true);
-    customType4.setTokenized(false);
-    keyField = new Field(KEYWORD_FIELD_KEY, customType4,  KEYWORD_TEXT);
+    keyField = new Field(KEYWORD_FIELD_KEY, StringField.TYPE_STORED,  KEYWORD_TEXT);
   }
 
   public static final FieldType customType5;
@@ -90,9 +87,8 @@ class DocHelper {
   public static final String NO_NORMS_KEY = "omitNorms";
   public static Field noNormsField;
   static {
-    customType5 = new FieldType(TextField.TYPE_UNSTORED);
+    customType5 = new FieldType(TextField.TYPE_STORED);
     customType5.setOmitNorms(true);
-    customType5.setStored(true);
     customType5.setTokenized(false);
     noNormsField = new Field(NO_NORMS_KEY, customType5, NO_NORMS_TEXT);
   }
@@ -102,9 +98,8 @@ class DocHelper {
   public static final String NO_TF_KEY = "omitTermFreqAndPositions";
   public static Field noTFField;
   static {
-    customType6 = new FieldType(TextField.TYPE_UNSTORED);
+    customType6 = new FieldType(TextField.TYPE_STORED);
     customType6.setIndexOptions(IndexOptions.DOCS_ONLY);
-    customType6.setStored(true);
     noTFField = new Field(NO_TF_KEY, customType6, NO_TF_TEXT);
   }
 

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test-framework/org/apache/lucene/util/LuceneTestCase.java Thu Aug 25 12:23:31 2011
@@ -1111,7 +1111,7 @@ public abstract class LuceneTestCase ext
   }
   
   public static Field newField(Random random, String name, String value, FieldType type) {
-    if (usually(random)) {
+    if (usually(random) || !type.indexed()) {
       // most of the time, don't modify the params
       return new Field(name, type, value);
     }
@@ -1121,11 +1121,8 @@ public abstract class LuceneTestCase ext
       newType.setStored(true); // randomly store it
     }
 
-    if (newType.indexed() && !newType.storeTermVectors()) {
-      newType.setStoreTermVectors(random.nextBoolean());
-    }
-
-    if (!newType.storeTermVectors()) {
+    if (!newType.storeTermVectors() && random.nextBoolean()) {
+      newType.setStoreTermVectors(true);
       if (!newType.storeTermVectorOffsets()) {
         newType.setStoreTermVectorOffsets(random.nextBoolean());
       }

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/TestDemo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/TestDemo.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/TestDemo.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/TestDemo.java Thu Aug 25 12:23:31 2011
@@ -50,9 +50,7 @@ public class TestDemo extends LuceneTest
     Document doc = new Document();
     String longTerm = "longtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongterm";
     String text = "This is the text to be indexed. " + longTerm;
-    FieldType textType = new FieldType(TextField.TYPE_UNSTORED);
-    textType.setStored(true);
-    doc.add(newField("fieldname", text, textType));
+    doc.add(newField("fieldname", text, TextField.TYPE_STORED));
     iwriter.addDocument(doc);
     iwriter.close();
     

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/Test2BTerms.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/Test2BTerms.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/Test2BTerms.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/Test2BTerms.java Thu Aug 25 12:23:31 2011
@@ -178,8 +178,7 @@ public class Test2BTerms extends LuceneT
       Document doc = new Document();
       final MyTokenStream ts = new MyTokenStream(random, TERMS_PER_DOC);
 
-      FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-      customType.setStored(true);
+      FieldType customType = new FieldType(TextField.TYPE_STORED);
       customType.setIndexOptions(IndexOptions.DOCS_ONLY);
       customType.setOmitNorms(true);
       Field field = new Field("field", customType, ts);

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java Thu Aug 25 12:23:31 2011
@@ -165,11 +165,9 @@ public class TestAddIndexes extends Luce
 
     // Adds 10 docs, then replaces them with another 10
     // docs, so 10 pending deletes:
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setTokenized(false);
     for (int i = 0; i < 20; i++) {
       Document doc = new Document();
-      doc.add(newField("id", "" + (i % 10), customType));
+      doc.add(newField("id", "" + (i % 10), StringField.TYPE_UNSTORED));
       doc.add(newField("content", "bbb " + i, TextField.TYPE_UNSTORED));
       writer.updateDocument(new Term("id", "" + (i%10)), doc);
     }
@@ -202,11 +200,9 @@ public class TestAddIndexes extends Luce
 
     // Adds 10 docs, then replaces them with another 10
     // docs, so 10 pending deletes:
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setTokenized(false);
     for (int i = 0; i < 20; i++) {
       Document doc = new Document();
-      doc.add(newField("id", "" + (i % 10), customType));
+      doc.add(newField("id", "" + (i % 10), StringField.TYPE_UNSTORED));
       doc.add(newField("content", "bbb " + i, TextField.TYPE_UNSTORED));
       writer.updateDocument(new Term("id", "" + (i%10)), doc);
     }
@@ -242,11 +238,9 @@ public class TestAddIndexes extends Luce
 
     // Adds 10 docs, then replaces them with another 10
     // docs, so 10 pending deletes:
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setTokenized(false);
     for (int i = 0; i < 20; i++) {
       Document doc = new Document();
-      doc.add(newField("id", "" + (i % 10), customType));
+      doc.add(newField("id", "" + (i % 10), StringField.TYPE_UNSTORED));
       doc.add(newField("content", "bbb " + i, TextField.TYPE_UNSTORED));
       writer.updateDocument(new Term("id", "" + (i%10)), doc);
     }
@@ -584,8 +578,7 @@ public class TestAddIndexes extends Luce
         .setMaxBufferedDocs(5).setMergePolicy(lmp));
 
     Document doc = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
+    FieldType customType = new FieldType(TextField.TYPE_STORED);
     customType.setStoreTermVectors(true);
     customType.setStoreTermVectorPositions(true);
     customType.setStoreTermVectorOffsets(true);
@@ -977,10 +970,8 @@ public class TestAddIndexes extends Luce
   private void addDocs3(IndexWriter writer, int numDocs) throws IOException {
     for (int i = 0; i < numDocs; i++) {
       Document doc = new Document();
-      FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-      customType.setStored(true);
       doc.add(newField("content", "aaa", TextField.TYPE_UNSTORED));
-      doc.add(newField("id", "" + i, customType));
+      doc.add(newField("id", "" + i, TextField.TYPE_STORED));
       writer.addDocument(doc);
     }
   }
@@ -1067,8 +1058,7 @@ public class TestAddIndexes extends Luce
       dirs[i] = new RAMDirectory();
       IndexWriter w = new IndexWriter(dirs[i], new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)));
       Document d = new Document();
-      FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-      customType.setStored(true);
+      FieldType customType = new FieldType(TextField.TYPE_STORED);
       customType.setStoreTermVectors(true);
       d.add(new Field("c", customType, "v"));
       w.addDocument(d);
@@ -1108,9 +1098,7 @@ public class TestAddIndexes extends Luce
         new MockAnalyzer(random)).setMergePolicy(lmp2);
     IndexWriter w2 = new IndexWriter(src, conf2);
     Document doc = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    doc.add(new Field("c", customType, "some text"));
+    doc.add(new Field("c", TextField.TYPE_STORED, "some text"));
     w2.addDocument(doc);
     doc = new Document();
     doc.add(new StringField("d", "delete"));

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAtomicUpdate.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAtomicUpdate.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAtomicUpdate.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestAtomicUpdate.java Thu Aug 25 12:23:31 2011
@@ -93,11 +93,9 @@ public class TestAtomicUpdate extends Lu
     @Override
     public void doWork() throws Exception {
       // Update all 100 docs...
-      FieldType customType = new FieldType(StringField.TYPE_UNSTORED);
-      customType.setStored(true);
       for(int i=0; i<100; i++) {
         Document d = new Document();
-        d.add(new Field("id", customType, Integer.toString(i)));
+        d.add(new Field("id", StringField.TYPE_STORED, Integer.toString(i)));
         d.add(new TextField("contents", English.intToEnglish(i+10*count)));
         writer.updateDocument(new Term("id", Integer.toString(i)), d);
       }
@@ -136,11 +134,9 @@ public class TestAtomicUpdate extends Lu
     writer.setInfoStream(VERBOSE ? System.out : null);
 
     // Establish a base index of 100 docs:
-    FieldType customType = new FieldType(StringField.TYPE_UNSTORED);
-    customType.setStored(true);
     for(int i=0;i<100;i++) {
       Document d = new Document();
-      d.add(newField("id", Integer.toString(i), customType));
+      d.add(newField("id", Integer.toString(i), StringField.TYPE_STORED));
       d.add(newField("contents", English.intToEnglish(i), TextField.TYPE_UNSTORED));
       if ((i-1)%7 == 0) {
         writer.commit();

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java Thu Aug 25 12:23:31 2011
@@ -21,8 +21,8 @@ import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintStream;
-import java.util.Arrays;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Random;
 
@@ -31,8 +31,9 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.NumericField;
-import org.apache.lucene.index.FieldInfo.IndexOptions;
+import org.apache.lucene.document.StringField;
 import org.apache.lucene.document.TextField;
+import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.search.DefaultSimilarity;
 import org.apache.lucene.search.DocIdSetIterator;
@@ -46,9 +47,9 @@ import org.apache.lucene.store.Directory
 import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.Constants;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
-import org.apache.lucene.util.Constants;
 
 /*
   Verify we can read the pre-4.0 file format, do searches
@@ -596,12 +597,8 @@ public class TestBackwardsCompatibility 
   {
     Document doc = new Document();
     doc.add(new TextField("content", "aaa"));
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    customType.setTokenized(false);
-    doc.add(new Field("id", customType, Integer.toString(id)));
-    FieldType customType2 = new FieldType(TextField.TYPE_UNSTORED);
-    customType2.setStored(true);
+    doc.add(new Field("id", StringField.TYPE_STORED, Integer.toString(id)));
+    FieldType customType2 = new FieldType(TextField.TYPE_STORED);
     customType2.setStoreTermVectors(true);
     customType2.setStoreTermVectorPositions(true);
     customType2.setStoreTermVectorOffsets(true);

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestCheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestCheckIndex.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestCheckIndex.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestCheckIndex.java Thu Aug 25 12:23:31 2011
@@ -38,8 +38,7 @@ public class TestCheckIndex extends Luce
     Directory dir = newDirectory();
     IndexWriter writer  = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMaxBufferedDocs(2));
     Document doc = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
+    FieldType customType = new FieldType(TextField.TYPE_STORED);
     customType.setStoreTermVectors(true);
     customType.setStoreTermVectorPositions(true);
     customType.setStoreTermVectorOffsets(true);

Modified: lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java?rev=1161533&r1=1161532&r2=1161533&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java (original)
+++ lucene/dev/branches/fieldtype_conflicted/lucene/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java Thu Aug 25 12:23:31 2011
@@ -17,16 +17,17 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
-import org.apache.lucene.store.MockDirectoryWrapper;
+import java.io.IOException;
+
 import org.apache.lucene.analysis.MockAnalyzer;
 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.store.MockDirectoryWrapper;
 import org.apache.lucene.util.LuceneTestCase;
-import java.io.IOException;
 
 public class TestConcurrentMergeScheduler extends LuceneTestCase {
   
@@ -77,10 +78,7 @@ public class TestConcurrentMergeSchedule
     IndexWriter writer = new IndexWriter(directory, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMaxBufferedDocs(2));
     writer.setInfoStream(VERBOSE ? System.out : null);
     Document doc = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    customType.setTokenized(false);
-    Field idField = newField("id", "", customType);
+    Field idField = newField("id", "", StringField.TYPE_STORED);
     doc.add(idField);
     int extraCount = 0;
 
@@ -140,10 +138,7 @@ public class TestConcurrentMergeSchedule
     writer.setInfoStream(VERBOSE ? System.out : null);
 
     Document doc = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    customType.setTokenized(false);
-    Field idField = newField("id", "", customType);
+    Field idField = newField("id", "", StringField.TYPE_STORED);
     doc.add(idField);
     for(int i=0;i<10;i++) {
       if (VERBOSE) {
@@ -210,10 +205,7 @@ public class TestConcurrentMergeSchedule
   public void testNoWaitClose() throws IOException {
     MockDirectoryWrapper directory = newDirectory();
     Document doc = new Document();
-    FieldType customType = new FieldType(TextField.TYPE_UNSTORED);
-    customType.setStored(true);
-    customType.setTokenized(false);
-    Field idField = newField("id", "", customType);
+    Field idField = newField("id", "", StringField.TYPE_STORED);
     doc.add(idField);
 
     IndexWriter writer = new IndexWriter(



Mime
View raw message