lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1212221 [1/4] - in /lucene/dev/branches/solrcloud: ./ dev-tools/eclipse/ dev-tools/idea/lucene/contrib/ dev-tools/maven/lucene/contrib/misc/ lucene/ lucene/contrib/memory/src/java/org/apache/lucene/index/memory/ lucene/contrib/memory/src/t...
Date Fri, 09 Dec 2011 02:19:48 GMT
Author: markrmiller
Date: Fri Dec  9 02:19:42 2011
New Revision: 1212221

URL: http://svn.apache.org/viewvc?rev=1212221&view=rev
Log:
merge up to r1212141

Added:
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/appending/
      - copied from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/appending/
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingPostingsFormat.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingPostingsFormat.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosFormat.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosFormat.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosWriter.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingSegmentInfosWriter.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsReader.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsWriter.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsWriter.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/MatchOnlyConjunctionTermsScorer.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MatchOnlyConjunctionTermsScorer.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/MatchOnlyTermScorer.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MatchOnlyTermScorer.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestCrashCausesCorruptIndex.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestCrashCausesCorruptIndex.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/codecs/appending/
      - copied from r1212211, lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/codecs/appending/
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java
      - copied unchanged from r1212211, lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCodec.java
    lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java
      - copied unchanged from r1212211, lucene/dev/trunk/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java
Removed:
    lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/index/codecs/
    lucene/dev/branches/solrcloud/lucene/contrib/misc/src/resources/
    lucene/dev/branches/solrcloud/lucene/contrib/misc/src/test/org/apache/lucene/index/codecs/
Modified:
    lucene/dev/branches/solrcloud/   (props changed)
    lucene/dev/branches/solrcloud/dev-tools/eclipse/dot.classpath
    lucene/dev/branches/solrcloud/dev-tools/idea/lucene/contrib/   (props changed)
    lucene/dev/branches/solrcloud/dev-tools/maven/lucene/contrib/misc/pom.xml.template
    lucene/dev/branches/solrcloud/lucene/   (props changed)
    lucene/dev/branches/solrcloud/lucene/CHANGES.txt
    lucene/dev/branches/solrcloud/lucene/common-build.xml
    lucene/dev/branches/solrcloud/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
    lucene/dev/branches/solrcloud/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java
    lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
    lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
    lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java
    lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java
    lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestSpanRegexQuery.java   (props changed)
    lucene/dev/branches/solrcloud/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/CheckIndex.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DirectoryReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocTermOrds.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocsEnum.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FieldInfo.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilteredTermsEnum.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexFileDeleter.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiFields.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiTermsEnum.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/NormsWriter.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentMerger.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/TermsEnum.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsWriter.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsConsumer.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsReaderBase.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/TermsConsumer.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/lucene3x/Lucene3xFields.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/lucene3x/SegmentTermDocs.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/lucene3x/TermInfosReaderIndex.java   (props changed)
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40PostingsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/lucene40/Lucene40TermVectorsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/memory/MemoryPostingsFormat.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextTermVectorsReader.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/values/IndexDocValues.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/BooleanQuery.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/ConjunctionTermScorer.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/FieldValueFilter.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/MultiPhraseQuery.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/PhraseQuery.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/search/TermQuery.java
    lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/store/MMapDirectory.java
    lucene/dev/branches/solrcloud/lucene/src/resources/META-INF/services/org.apache.lucene.index.codecs.Codec
    lucene/dev/branches/solrcloud/lucene/src/test-framework/java/org/apache/lucene/index/codecs/ramonly/RAMOnlyPostingsFormat.java
    lucene/dev/branches/solrcloud/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java
    lucene/dev/branches/solrcloud/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCaseRunner.java
    lucene/dev/branches/solrcloud/lucene/src/test-framework/java/org/apache/lucene/util/_TestUtil.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/Test2BTerms.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestAddIndexes.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestCodecs.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestDirectoryReader.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestDocCount.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestDocsAndPositions.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestDuelingCodecs.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestIndexReader.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestLongPostings.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestMultiFields.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestOmitPositions.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestSegmentReader.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestSegmentTermDocs.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestStressAdvance.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestTermVectorsReader.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/TestTermsEnum.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/codecs/pulsing/Test10KPulsings.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/codecs/pulsing/TestPulsingReuse.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/index/values/TestTypePromotion.java
    lucene/dev/branches/solrcloud/lucene/src/test/org/apache/lucene/search/TestTermVectors.java
    lucene/dev/branches/solrcloud/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java
    lucene/dev/branches/solrcloud/modules/analysis/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java
    lucene/dev/branches/solrcloud/modules/benchmark/   (props changed)
    lucene/dev/branches/solrcloud/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
    lucene/dev/branches/solrcloud/modules/facet/   (props changed)
    lucene/dev/branches/solrcloud/modules/facet/src/java/org/apache/lucene/facet/search/sampling/TakmiSampleFixer.java
    lucene/dev/branches/solrcloud/modules/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
    lucene/dev/branches/solrcloud/modules/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
    lucene/dev/branches/solrcloud/modules/facet/src/test/org/apache/lucene/facet/FacetTestBase.java
    lucene/dev/branches/solrcloud/modules/facet/src/test/org/apache/lucene/facet/search/TestMultipleCategoryLists.java
    lucene/dev/branches/solrcloud/modules/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
    lucene/dev/branches/solrcloud/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java
    lucene/dev/branches/solrcloud/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java
    lucene/dev/branches/solrcloud/modules/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java
    lucene/dev/branches/solrcloud/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java   (props changed)
    lucene/dev/branches/solrcloud/modules/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java
    lucene/dev/branches/solrcloud/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/FloatMagicTest.java
    lucene/dev/branches/solrcloud/modules/suggest/src/test/org/apache/lucene/search/suggest/fst/TestSort.java
    lucene/dev/branches/solrcloud/solr/   (props changed)
    lucene/dev/branches/solrcloud/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/solrcloud/solr/LICENSE.txt   (props changed)
    lucene/dev/branches/solrcloud/solr/NOTICE.txt   (props changed)
    lucene/dev/branches/solrcloud/solr/README.txt   (props changed)
    lucene/dev/branches/solrcloud/solr/build.xml   (contents, props changed)
    lucene/dev/branches/solrcloud/solr/client/   (props changed)
    lucene/dev/branches/solrcloud/solr/cloud-dev/   (props changed)
    lucene/dev/branches/solrcloud/solr/common-build.xml   (props changed)
    lucene/dev/branches/solrcloud/solr/contrib/   (props changed)
    lucene/dev/branches/solrcloud/solr/contrib/clustering/src/test-files/   (props changed)
    lucene/dev/branches/solrcloud/solr/contrib/dataimporthandler-extras/src/java/   (props changed)
    lucene/dev/branches/solrcloud/solr/contrib/dataimporthandler/src/java/   (props changed)
    lucene/dev/branches/solrcloud/solr/contrib/dataimporthandler/src/test-files/   (props changed)
    lucene/dev/branches/solrcloud/solr/contrib/dataimporthandler/src/test/org/   (props changed)
    lucene/dev/branches/solrcloud/solr/contrib/uima/src/java/   (props changed)
    lucene/dev/branches/solrcloud/solr/contrib/uima/src/test-files/   (props changed)
    lucene/dev/branches/solrcloud/solr/core/   (props changed)
    lucene/dev/branches/solrcloud/solr/core/src/java/   (props changed)
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/core/SolrCore.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/ByteField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/DoubleField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/FloatField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/IntField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/LongField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/ShortField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/SortableDoubleField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/SortableFloatField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/SortableIntField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/SortableLongField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/TrieDoubleField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/TrieFloatField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/TrieIntField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/schema/TrieLongField.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/spelling/SpellingQueryConverter.java
    lucene/dev/branches/solrcloud/solr/core/src/test/   (props changed)
    lucene/dev/branches/solrcloud/solr/core/src/test-files/solr/conf/solrconfig-elevate.xml
    lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
    lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java
    lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java
    lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
    lucene/dev/branches/solrcloud/solr/dev-tools/   (props changed)
    lucene/dev/branches/solrcloud/solr/example/   (props changed)
    lucene/dev/branches/solrcloud/solr/lib/   (props changed)
    lucene/dev/branches/solrcloud/solr/scripts/   (props changed)
    lucene/dev/branches/solrcloud/solr/site/   (props changed)
    lucene/dev/branches/solrcloud/solr/site-src/   (props changed)
    lucene/dev/branches/solrcloud/solr/solrj/   (props changed)
    lucene/dev/branches/solrcloud/solr/solrj/src/java/   (props changed)
    lucene/dev/branches/solrcloud/solr/solrj/src/test/org/apache/solr/client/   (props changed)
    lucene/dev/branches/solrcloud/solr/solrj/src/test/org/apache/solr/client/solrj/   (props changed)
    lucene/dev/branches/solrcloud/solr/solrj/src/test/org/apache/solr/common/   (props changed)
    lucene/dev/branches/solrcloud/solr/test-framework/   (props changed)
    lucene/dev/branches/solrcloud/solr/testlogging.properties   (props changed)
    lucene/dev/branches/solrcloud/solr/webapp/   (props changed)

Modified: lucene/dev/branches/solrcloud/dev-tools/eclipse/dot.classpath
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/dev-tools/eclipse/dot.classpath?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/dev-tools/eclipse/dot.classpath (original)
+++ lucene/dev/branches/solrcloud/dev-tools/eclipse/dot.classpath Fri Dec  9 02:19:42 2011
@@ -13,7 +13,6 @@
 	<classpathentry kind="src" path="lucene/contrib/memory/src/java"/>
 	<classpathentry kind="src" path="lucene/contrib/memory/src/test"/>
 	<classpathentry kind="src" path="lucene/contrib/misc/src/java"/>
-	<classpathentry kind="src" output="bin.misc" path="lucene/contrib/misc/src/resources"/>
 	<classpathentry kind="src" path="lucene/contrib/misc/src/test"/>
 	<classpathentry kind="src" path="lucene/contrib/sandbox/src/java"/>
 	<classpathentry kind="src" path="lucene/contrib/sandbox/src/test"/>

Modified: lucene/dev/branches/solrcloud/dev-tools/maven/lucene/contrib/misc/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/dev-tools/maven/lucene/contrib/misc/pom.xml.template?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/dev-tools/maven/lucene/contrib/misc/pom.xml.template (original)
+++ lucene/dev/branches/solrcloud/dev-tools/maven/lucene/contrib/misc/pom.xml.template Fri Dec  9 02:19:42 2011
@@ -54,11 +54,6 @@
     <outputDirectory>${build-directory}/classes/java</outputDirectory>
     <testOutputDirectory>${build-directory}/classes/test</testOutputDirectory>
     <sourceDirectory>src/java</sourceDirectory>
-    <resources>
-      <resource>
-        <directory>src/resources</directory>
-      </resource>
-    </resources>
     <testSourceDirectory>src/test</testSourceDirectory>
     <testResources>
       <testResource>

Modified: lucene/dev/branches/solrcloud/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/CHANGES.txt?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/solrcloud/lucene/CHANGES.txt Fri Dec  9 02:19:42 2011
@@ -649,6 +649,13 @@ Changes in backwards compatibility polic
   FieldCacheTermsFilter.FieldCacheTermsFilterDocIdSet was removed and
   replaced by another internal implementation.  (Uwe Schindler)
 
+* LUCENE-3620: FilterIndexReader now overrides all methods of IndexReader that 
+  it should (note that some are still not overridden, as they should be 
+  overridden by sub-classes only). In the process, some methods of IndexReader 
+  were made final. This is not expected to affect many apps, since these methods
+  already delegate to abstract methods, which you had to already override 
+  anyway. (Shai Erera)
+  
 Security fixes
 
 * LUCENE-3588: Try harder to prevent SIGSEGV on cloned MMapIndexInputs:
@@ -669,6 +676,13 @@ Bug fixes
   to correctly respect deletions on reopened SegmentReaders. Factored out
   FieldCacheDocIdSet to be a top-level class.  (Uwe Schindler, Simon Willnauer)
 
+* LUCENE-3627: Don't let an errant 0-byte segments_N file corrupt the index.
+  (Ken McCracken via Mike McCandless)
+
+Documentation
+
+* LUCENE-3597: Fixed incorrect grouping documentation. (Martijn van Groningen, Robert Muir)
+
 Build
 
 * LUCENE-3228: Stop downloading external javadoc package-list files:

Modified: lucene/dev/branches/solrcloud/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/common-build.xml?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/common-build.xml (original)
+++ lucene/dev/branches/solrcloud/lucene/common-build.xml Fri Dec  9 02:19:42 2011
@@ -94,10 +94,13 @@
   <property name="tests.seed" value="random" />
   <property name="tests.loggingfile" value="/dev/null"/>
   <property name="tests.nightly" value="false" />
+  <property name="tests.weekly" value="false" />
+  <property name="tests.slow" value="false" />
   <property name="tests.cleanthreads.sysprop" value="perMethod"/>
   <property name="tests.asserts.gracious" value="false"/>
   <property name="tests.verbose" value="false"/>
   <property name="tests.infostream" value="${tests.verbose}"/>
+  <property name="tests.heapsize" value="512M"/>
     
   <property name="javac.deprecation" value="off"/>
   <property name="javac.debug" value="on"/>
@@ -527,8 +530,10 @@
   	<attribute name="tempDir" default="${build.dir}/test"/>
   	<attribute name="threadNum" default="1"/>
   	<attribute name="threadTotal" default="1"/>
-        <attribute name="tests.nightly" default="${tests.nightly}"/>
-        <attribute name="tests.multiplier" default="${tests.multiplier}"/>
+    <attribute name="tests.nightly" default="${tests.nightly}"/>
+    <attribute name="tests.weekly" default="${tests.weekly}"/>
+    <attribute name="tests.slow" default="${tests.slow}"/>
+    <attribute name="tests.multiplier" default="${tests.multiplier}"/>
 
     <sequential>
 	    <condition property="runall">
@@ -542,7 +547,7 @@
 	    This is very loud and obnoxious. abuse touch instead for a "quiet" mkdir
 	    -->
     	<touch file="@{tempDir}/@{threadNum}/quiet.ant" verbose="false" mkdirs="true"/>
-	    <junit printsummary="off" haltonfailure="no" maxmemory="512M" tempdir="@{tempDir}/@{threadNum}"
+	    <junit printsummary="off" haltonfailure="no" maxmemory="${tests.heapsize}" tempdir="@{tempDir}/@{threadNum}"
 	      errorProperty="tests.failed" failureProperty="tests.failed" forkmode="perBatch" dir="@{tempDir}/@{threadNum}">
 	      <classpath refid="@{junit.classpath}"/>
 	      <assertions>
@@ -584,6 +589,10 @@
               <sysproperty key="java.util.logging.config.file" value="${tests.loggingfile}"/>
           <!-- set whether or not nightly tests should run -->
           <sysproperty key="tests.nightly" value="@{tests.nightly}"/>
+        <!-- set whether or not weekly tests should run -->
+          <sysproperty key="tests.weekly" value="@{tests.weekly}"/>
+        <!-- set whether or not slow tests should run -->
+          <sysproperty key="tests.slow" value="@{tests.slow}"/>
 	    	
           <!-- set whether tests framework should not require java assertions enabled -->
           <sysproperty key="tests.asserts.gracious" value="${tests.asserts.gracious}"/>
@@ -1038,6 +1047,7 @@
 
         <fileset dir="@{artifacts.dir}">
           <include name="**/*.jar"/>
+          <include name="**/*.war"/>
           <include name="**/*.zip"/>
           <include name="**/*.tgz"/>
           <include name="**/*.pom"/>

Modified: lucene/dev/branches/solrcloud/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java (original)
+++ lucene/dev/branches/solrcloud/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java Fri Dec  9 02:19:42 2011
@@ -936,7 +936,7 @@ public class MemoryIndex {
       }
 
       @Override
-      public DocsEnum docs(Bits liveDocs, DocsEnum reuse) {
+      public DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) {
         if (reuse == null || !(reuse instanceof MemoryDocsEnum)) {
           reuse = new MemoryDocsEnum();
         }

Modified: lucene/dev/branches/solrcloud/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java (original)
+++ lucene/dev/branches/solrcloud/lucene/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java Fri Dec  9 02:19:42 2011
@@ -188,7 +188,7 @@ public class MemoryIndexTest extends Bas
     MemoryIndex memory = new MemoryIndex();
     memory.addField("foo", "bar", analyzer);
     IndexReader reader = memory.createSearcher().getIndexReader();
-    DocsEnum disi = reader.termDocsEnum(null, "foo", new BytesRef("bar"));
+    DocsEnum disi = _TestUtil.docs(random, reader, "foo", new BytesRef("bar"), null, null, false);
     int docid = disi.docID();
     assertTrue(docid == -1 || docid == DocIdSetIterator.NO_MORE_DOCS);
     assertTrue(disi.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
@@ -196,7 +196,7 @@ public class MemoryIndexTest extends Bas
     // now reuse and check again
     TermsEnum te = reader.terms("foo").iterator(null);
     assertTrue(te.seekExact(new BytesRef("bar"), true));
-    disi = te.docs(null, disi);
+    disi = te.docs(null, disi, false);
     docid = disi.docID();
     assertTrue(docid == -1 || docid == DocIdSetIterator.NO_MORE_DOCS);
     assertTrue(disi.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);

Modified: lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java (original)
+++ lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java Fri Dec  9 02:19:42 2011
@@ -129,12 +129,19 @@ public class FieldNormModifier {
           if (terms != null) {
             TermsEnum termsEnum = terms.iterator(null);
             DocsEnum docs = null;
+            DocsEnum docsAndFreqs = null;
             while(termsEnum.next() != null) {
-              docs = termsEnum.docs(liveDocs, docs);
+              docsAndFreqs = termsEnum.docs(liveDocs, docsAndFreqs, true);
+              final DocsEnum docs2;
+              if (docsAndFreqs != null) {
+                docs2 = docsAndFreqs;
+              } else {
+                docs2 = docs = termsEnum.docs(liveDocs, docs, false);
+              }
               while(true) {
-                int docID = docs.nextDoc();
+                int docID = docs2.nextDoc();
                 if (docID != docs.NO_MORE_DOCS) {
-                  termCounts[docID] += docs.freq();
+                  termCounts[docID] += docsAndFreqs == null ? 1 : docsAndFreqs.freq();
                 } else {
                   break;
                 }

Modified: lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java (original)
+++ lucene/dev/branches/solrcloud/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java Fri Dec  9 02:19:42 2011
@@ -201,7 +201,7 @@ public class HighFreqTerms {
             return;
           }
         }
-        DocsEnum de = r.termDocsEnum(liveDocs, field, termText);
+        DocsEnum de = r.termDocsEnum(liveDocs, field, termText, true);
         if (de != null) {
           while (de.nextDoc() != DocIdSetIterator.NO_MORE_DOCS)
             totalTF[0] += de.freq();

Modified: lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java (original)
+++ lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/java/org/apache/lucene/sandbox/queries/DuplicateFilter.java Fri Dec  9 02:19:42 2011
@@ -93,7 +93,7 @@ public class DuplicateFilter extends Fil
       if (currTerm == null) {
         break;
       } else {
-        docs = termsEnum.docs(acceptDocs, docs);
+        docs = termsEnum.docs(acceptDocs, docs, false);
         int doc = docs.nextDoc();
         if (doc != DocsEnum.NO_MORE_DOCS) {
           if (keepMode == KeepMode.KM_USE_FIRST_OCCURRENCE) {
@@ -133,7 +133,7 @@ public class DuplicateFilter extends Fil
       } else {
         if (termsEnum.docFreq() > 1) {
           // unset potential duplicates
-          docs = termsEnum.docs(acceptDocs, docs);
+          docs = termsEnum.docs(acceptDocs, docs, false);
           int doc = docs.nextDoc();
           if (doc != DocsEnum.NO_MORE_DOCS) {
             if (keepMode == KeepMode.KM_USE_FIRST_OCCURRENCE) {

Modified: lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java (original)
+++ lucene/dev/branches/solrcloud/lucene/contrib/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java Fri Dec  9 02:19:42 2011
@@ -17,6 +17,9 @@ package org.apache.lucene.sandbox.querie
  * limitations under the License.
  */
 
+import java.io.IOException;
+import java.util.HashSet;
+
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.StringField;
@@ -28,9 +31,7 @@ import org.apache.lucene.search.TermQuer
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.LuceneTestCase;
-
-import java.io.IOException;
-import java.util.HashSet;
+import org.apache.lucene.util._TestUtil;
 
 public class DuplicateFilterTest extends LuceneTestCase {
   private static final String KEY_FIELD = "url";
@@ -134,10 +135,13 @@ public class DuplicateFilterTest extends
     for (ScoreDoc hit : hits) {
       Document d = searcher.doc(hit.doc);
       String url = d.get(KEY_FIELD);
-      DocsEnum td = MultiFields.getTermDocsEnum(reader,
-          MultiFields.getLiveDocs(reader),
-          KEY_FIELD,
-          new BytesRef(url));
+      DocsEnum td = _TestUtil.docs(random, reader,
+                                   KEY_FIELD,
+                                   new BytesRef(url),
+                                   MultiFields.getLiveDocs(reader),
+                                   null,
+                                   false);
+
       int lastDoc = 0;
       while (td.nextDoc() != DocsEnum.NO_MORE_DOCS) {
         lastDoc = td.docID();
@@ -155,10 +159,13 @@ public class DuplicateFilterTest extends
     for (ScoreDoc hit : hits) {
       Document d = searcher.doc(hit.doc);
       String url = d.get(KEY_FIELD);
-      DocsEnum td = MultiFields.getTermDocsEnum(reader,
-          MultiFields.getLiveDocs(reader),
-          KEY_FIELD,
-          new BytesRef(url));
+      DocsEnum td = _TestUtil.docs(random, reader,
+                                   KEY_FIELD,
+                                   new BytesRef(url),
+                                   MultiFields.getLiveDocs(reader),
+                                   null,
+                                   false);
+
       int lastDoc = 0;
       td.nextDoc();
       lastDoc = td.docID();

Modified: lucene/dev/branches/solrcloud/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java (original)
+++ lucene/dev/branches/solrcloud/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianShapeFilter.java Fri Dec  9 02:19:42 2011
@@ -57,7 +57,7 @@ public class CartesianShapeFilter extend
       return new DocIdSet() {
         @Override
         public DocIdSetIterator iterator() throws IOException {
-          return context.reader.termDocsEnum(acceptDocs, fieldName, bytesRef);
+          return context.reader.termDocsEnum(acceptDocs, fieldName, bytesRef, false);
         }
         
         @Override
@@ -70,7 +70,7 @@ public class CartesianShapeFilter extend
       for (int i =0; i< sz; i++) {
         double boxId = area.get(i).doubleValue();
         NumericUtils.longToPrefixCoded(NumericUtils.doubleToSortableLong(boxId), 0, bytesRef);
-        final DocsEnum docsEnum = context.reader.termDocsEnum(acceptDocs, fieldName, bytesRef);
+        final DocsEnum docsEnum = context.reader.termDocsEnum(acceptDocs, fieldName, bytesRef, false);
         if (docsEnum == null) continue;
         // iterate through all documents
         // which have this boxId

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/BufferedDeletesStream.java Fri Dec  9 02:19:42 2011
@@ -387,7 +387,7 @@ class BufferedDeletesStream {
       // System.out.println("  term=" + term);
 
       if (termsEnum.seekExact(term.bytes(), false)) {
-        DocsEnum docsEnum = termsEnum.docs(reader.getLiveDocs(), docs);
+        DocsEnum docsEnum = termsEnum.docs(reader.getLiveDocs(), docs, false);
         //System.out.println("BDS: got docsEnum=" + docsEnum);
 
         if (docsEnum != null) {

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/CheckIndex.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/CheckIndex.java Fri Dec  9 02:19:42 2011
@@ -683,6 +683,7 @@ public class CheckIndex {
       }
      
       DocsEnum docs = null;
+      DocsEnum docsAndFreqs = null;
       DocsAndPositionsEnum postings = null;
 
       final FieldsEnum fieldsEnum = fields.iterator();
@@ -740,7 +741,8 @@ public class CheckIndex {
           status.totFreq += docFreq;
           sumDocFreq += docFreq;
 
-          docs = termsEnum.docs(liveDocs, docs);
+          docs = termsEnum.docs(liveDocs, docs, false);
+          docsAndFreqs = termsEnum.docs(liveDocs, docsAndFreqs, true);
           postings = termsEnum.docsAndPositions(liveDocs, postings);
 
           if (hasOrd) {
@@ -762,13 +764,24 @@ public class CheckIndex {
           status.termCount++;
 
           final DocsEnum docs2;
+          final DocsEnum docsAndFreqs2;
           final boolean hasPositions;
+          final boolean hasFreqs;
           if (postings != null) {
             docs2 = postings;
+            docsAndFreqs2 = postings;
             hasPositions = true;
+            hasFreqs = true;
+          } else if (docsAndFreqs != null) {
+            docs2 = docsAndFreqs;
+            docsAndFreqs2 = docsAndFreqs;
+            hasPositions = false;
+            hasFreqs = true;
           } else {
             docs2 = docs;
+            docsAndFreqs2 = null;
             hasPositions = false;
+            hasFreqs = false;
           }
 
           int lastDoc = -1;
@@ -780,9 +793,15 @@ public class CheckIndex {
               break;
             }
             visitedDocs.set(doc);
-            final int freq = docs2.freq();
-            status.totPos += freq;
-            totalTermFreq += freq;
+            int freq = -1;
+            if (hasFreqs) {
+              freq = docsAndFreqs2.freq();
+              if (freq <= 0) {
+                throw new RuntimeException("term " + term + ": doc " + doc + ": freq " + freq + " is out of bounds");
+              }
+              status.totPos += freq;
+              totalTermFreq += freq;
+            }
             docCount++;
 
             if (doc <= lastDoc) {
@@ -793,12 +812,9 @@ public class CheckIndex {
             }
 
             lastDoc = doc;
-            if (freq <= 0) {
-              throw new RuntimeException("term " + term + ": doc " + doc + ": freq " + freq + " is out of bounds");
-            }
             
             int lastPos = -1;
-            if (postings != null) {
+            if (hasPositions) {
               for(int j=0;j<freq;j++) {
                 final int pos = postings.nextPosition();
                 if (pos < -1) {
@@ -820,13 +836,23 @@ public class CheckIndex {
 
           // Re-count if there are deleted docs:
           if (reader.hasDeletions()) {
-            final DocsEnum docsNoDel = termsEnum.docs(null, docs);
-            docCount = 0;
-            totalTermFreq = 0;
-            while(docsNoDel.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
-              visitedDocs.set(docsNoDel.docID());
-              docCount++;
-              totalTermFreq += docsNoDel.freq();
+            if (hasFreqs) {
+              final DocsEnum docsNoDel = termsEnum.docs(null, docsAndFreqs, true);
+              docCount = 0;
+              totalTermFreq = 0;
+              while(docsNoDel.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
+                visitedDocs.set(docsNoDel.docID());
+                docCount++;
+                totalTermFreq += docsNoDel.freq();
+              }
+            } else {
+              final DocsEnum docsNoDel = termsEnum.docs(null, docs, false);
+              docCount = 0;
+              totalTermFreq = -1;
+              while(docsNoDel.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
+                visitedDocs.set(docsNoDel.docID());
+                docCount++;
+              }
             }
           }
 
@@ -883,7 +909,7 @@ public class CheckIndex {
           } else {
             for(int idx=0;idx<7;idx++) {
               final int skipDocID = (int) (((idx+1)*(long) maxDoc)/8);
-              docs = termsEnum.docs(liveDocs, docs);
+              docs = termsEnum.docs(liveDocs, docs, false);
               final int docID = docs.advance(skipDocID);
               if (docID == DocsEnum.NO_MORE_DOCS) {
                 break;
@@ -986,7 +1012,7 @@ public class CheckIndex {
                   throw new RuntimeException("seek to existing term " + seekTerms[i] + " failed");
                 }
               
-                docs = termsEnum.docs(liveDocs, docs);
+                docs = termsEnum.docs(liveDocs, docs, false);
                 if (docs == null) {
                   throw new RuntimeException("null DocsEnum from to existing term " + seekTerms[i]);
                 }
@@ -1168,6 +1194,7 @@ public class CheckIndex {
 
       // TODO: maybe we can factor out testTermIndex and reuse here?
       DocsEnum docs = null;
+      DocsEnum docsAndFreqs = null;
       DocsAndPositionsEnum postings = null;
       final Bits liveDocs = reader.getLiveDocs();
       for (int j = 0; j < info.docCount; ++j) {
@@ -1210,50 +1237,53 @@ public class CheckIndex {
                 if (totalTermFreq != -1 && totalTermFreq <= 0) {
                   throw new RuntimeException("totalTermFreq: " + totalTermFreq + " is out of bounds");
                 }
-                
-                DocsEnum docsEnum;
-                DocsAndPositionsEnum dp = termsEnum.docsAndPositions(null, postings);
-                if (dp == null) {
-                  DocsEnum d = termsEnum.docs(null, docs);
-                  docsEnum = docs = d;
+
+                postings = termsEnum.docsAndPositions(null, postings);
+                if (postings == null) {
+                  docsAndFreqs = termsEnum.docs(null, docsAndFreqs, true);
+                  if (docsAndFreqs == null) {
+                    docs = termsEnum.docs(null, docs, false);
+                  } else {
+                    docs = docsAndFreqs;
+                  }
                 } else {
-                  docsEnum = postings = dp;
+                  docs = docsAndFreqs = postings;
                 }
-                  
-                final int doc = docsEnum.nextDoc();
+
+                final int doc = docs.nextDoc();
                   
                 if (doc != 0) {
                   throw new RuntimeException("vector for doc " + j + " didn't return docID=0: got docID=" + doc);
                 }
-                  
-                final int tf = docsEnum.freq();
-                tfvComputedSumTotalTermFreq += tf;
-                
-                if (tf <= 0) {
-                  throw new RuntimeException("vector freq " + tf + " is out of bounds");
-                }
-                
-                if (totalTermFreq != -1 && totalTermFreq != tf) {
-                  throw new RuntimeException("vector totalTermFreq " + totalTermFreq + " != tf " + tf);
-                }
+
+                if (docsAndFreqs != null) {
+                  final int tf = docsAndFreqs.freq();
+                  if (tf <= 0) {
+                    throw new RuntimeException("vector freq " + tf + " is out of bounds");
+                  }
+                  if (totalTermFreq != -1 && totalTermFreq != tf) {
+                    throw new RuntimeException("vector totalTermFreq " + totalTermFreq + " != tf " + tf);
+                  }
+                  tfvComputedSumTotalTermFreq += tf;
                 
-                if (dp != null) {
-                  int lastPosition = -1;
-                  for (int i = 0; i < tf; i++) {
-                    int pos = dp.nextPosition();
-                    if (pos != -1 && pos < 0) {
-                      throw new RuntimeException("vector position " + pos + " is out of bounds");
-                    }
+                  if (postings != null) {
+                    int lastPosition = -1;
+                    for (int i = 0; i < tf; i++) {
+                      int pos = postings.nextPosition();
+                      if (pos != -1 && pos < 0) {
+                        throw new RuntimeException("vector position " + pos + " is out of bounds");
+                      }
                     
-                    if (pos < lastPosition) {
-                      throw new RuntimeException("vector position " + pos + " < lastPos " + lastPosition);
-                    }
+                      if (pos < lastPosition) {
+                        throw new RuntimeException("vector position " + pos + " < lastPos " + lastPosition);
+                      }
                     
-                    lastPosition = pos;
+                      lastPosition = pos;
+                    }
                   }
                 }
                   
-                if (docsEnum.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
+                if (docs.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
                   throw new RuntimeException("vector for doc " + j + " references multiple documents!");
                 }
               }

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DirectoryReader.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DirectoryReader.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DirectoryReader.java Fri Dec  9 02:19:42 2011
@@ -686,7 +686,7 @@ class DirectoryReader extends IndexReade
       segmentInfos.setUserData(commitUserData);
       // Default deleter (for backwards compatibility) is
       // KeepOnlyLastCommitDeleter:
-      // nocommit: Decide what to do with InfoStream here? Use default or keep NO_OUTPUT?
+      // TODO: Decide what to do with InfoStream here? Use default or keep NO_OUTPUT?
       IndexFileDeleter deleter = new IndexFileDeleter(directory,
                                                       deletionPolicy == null ? new KeepOnlyLastCommitDeletionPolicy() : deletionPolicy,
                                                       segmentInfos, InfoStream.NO_OUTPUT, null);

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocTermOrds.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocTermOrds.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocTermOrds.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocTermOrds.java Fri Dec  9 02:19:42 2011
@@ -314,7 +314,7 @@ public class DocTermOrds {
       final int df = te.docFreq();
       if (df <= maxTermDocFreq) {
 
-        docsEnum = te.docs(liveDocs, docsEnum);
+        docsEnum = te.docs(liveDocs, docsEnum, false);
 
         // dF, but takes deletions into account
         int actualDF = 0;
@@ -650,8 +650,8 @@ public class DocTermOrds {
     }
 
     @Override    
-    public DocsEnum docs(Bits liveDocs, DocsEnum reuse) throws IOException {
-      return termsEnum.docs(liveDocs, reuse);
+    public DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) throws IOException {
+      return termsEnum.docs(liveDocs, reuse, needsFreqs);
     }
 
     @Override    

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocsEnum.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocsEnum.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/DocsEnum.java Fri Dec  9 02:19:42 2011
@@ -20,7 +20,7 @@ package org.apache.lucene.index;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.util.AttributeSource;
 
-/** Iterates through the documents, term freq and positions.
+/** Iterates through the documents and term freqs.
  *  NOTE: you must first call {@link #nextDoc} before using
  *  any of the per-doc methods. */
 public abstract class DocsEnum extends DocIdSetIterator {

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FieldInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FieldInfo.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FieldInfo.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FieldInfo.java Fri Dec  9 02:19:42 2011
@@ -44,6 +44,7 @@ public final class FieldInfo {
    */
   public static enum IndexOptions { 
     /** only documents are indexed: term frequencies and positions are omitted */
+    // TODO: maybe rename to just DOCS?
     DOCS_ONLY,
     /** only documents and term frequencies are indexed: positions are omitted */  
     DOCS_AND_FREQS,

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java Fri Dec  9 02:19:42 2011
@@ -175,8 +175,8 @@ public class FilterIndexReader extends I
     }
 
     @Override
-    public DocsEnum docs(Bits liveDocs, DocsEnum reuse) throws IOException {
-      return in.docs(liveDocs, reuse);
+    public DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) throws IOException {
+      return in.docs(liveDocs, reuse, needsFreqs);
     }
 
     @Override

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilteredTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilteredTermsEnum.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilteredTermsEnum.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/FilteredTermsEnum.java Fri Dec  9 02:19:42 2011
@@ -166,8 +166,8 @@ public abstract class FilteredTermsEnum 
   }
 
   @Override
-  public DocsEnum docs(Bits bits, DocsEnum reuse) throws IOException {
-    return tenum.docs(bits, reuse);
+  public DocsEnum docs(Bits bits, DocsEnum reuse, boolean needsFreqs) throws IOException {
+    return tenum.docs(bits, reuse, needsFreqs);
   }
     
   @Override

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexFileDeleter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexFileDeleter.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexFileDeleter.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexFileDeleter.java Fri Dec  9 02:19:42 2011
@@ -179,7 +179,7 @@ final class IndexFileDeleter {
             }
             sis = null;
           } catch (IOException e) {
-            if (SegmentInfos.generationFromSegmentsFileName(fileName) <= currentGen) {
+            if (SegmentInfos.generationFromSegmentsFileName(fileName) <= currentGen && directory.fileLength(fileName) > 0) {
               throw e;
             } else {
               // Most likely we are opening an index that

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexReader.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexReader.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/IndexReader.java Fri Dec  9 02:19:42 2011
@@ -31,6 +31,7 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.index.codecs.PerDocValues;
 import org.apache.lucene.index.values.IndexDocValues;
 import org.apache.lucene.search.FieldCache; // javadocs
+import org.apache.lucene.search.SearcherManager; // javadocs
 import org.apache.lucene.search.similarities.Similarity;
 import org.apache.lucene.store.*;
 import org.apache.lucene.util.ArrayUtil;
@@ -484,8 +485,7 @@ public abstract class IndexReader implem
    * for doing so); if a new reader is returned you also
    * must eventually close it.  Be sure to never close a
    * reader while other threads are still using it; see
-   * <code>SearcherManager</code> in
-   * <code>contrib/misc</code> to simplify managing this.
+   * {@link SearcherManager} to simplify managing this.
    *
    * <p>If a new reader is returned, it's safe to make changes
    * (deletions, norms) with it.  All shared mutable state
@@ -543,7 +543,7 @@ public abstract class IndexReader implem
    * <p>This provides "near real-time" searching, in that
    * changes made during an {@link IndexWriter} session can be
    * quickly made available for searching without closing
-   * the writer nor calling {@link #commit}.
+   * the writer nor calling {@link IndexWriter#commit}.
    *
    * <p>It's <i>near</i> real-time because there is no hard
    * guarantee on how quickly you can get a new reader after
@@ -1033,7 +1033,7 @@ public abstract class IndexReader implem
   /** Returns {@link DocsEnum} for the specified field &
    *  term.  This may return null, if either the field or
    *  term does not exist. */
-  public DocsEnum termDocsEnum(Bits liveDocs, String field, BytesRef term) throws IOException {
+  public DocsEnum termDocsEnum(Bits liveDocs, String field, BytesRef term, boolean needsFreqs) throws IOException {
     assert field != null;
     assert term != null;
     final Fields fields = fields();
@@ -1042,7 +1042,7 @@ public abstract class IndexReader implem
       if (terms != null) {
         final TermsEnum termsEnum = terms.iterator(null);
         if (termsEnum.seekExact(term, true)) {
-          return termsEnum.docs(liveDocs, null);
+          return termsEnum.docs(liveDocs, null, needsFreqs);
         }
       }
     }
@@ -1052,7 +1052,7 @@ public abstract class IndexReader implem
   /** Returns {@link DocsAndPositionsEnum} for the specified
    *  field & term.  This may return null, if either the
    *  field or term does not exist, or, positions were not
-   *  stored for this term. */
+   *  indexed for this field. */
   public DocsAndPositionsEnum termPositionsEnum(Bits liveDocs, String field, BytesRef term) throws IOException {
     assert field != null;
     assert term != null;
@@ -1074,7 +1074,7 @@ public abstract class IndexReader implem
    * {@link TermState}. This may return null, if either the field or the term
    * does not exists or the {@link TermState} is invalid for the underlying
    * implementation.*/
-  public DocsEnum termDocsEnum(Bits liveDocs, String field, BytesRef term, TermState state) throws IOException {
+  public DocsEnum termDocsEnum(Bits liveDocs, String field, BytesRef term, TermState state, boolean needsFreqs) throws IOException {
     assert state != null;
     assert field != null;
     final Fields fields = fields();
@@ -1083,7 +1083,7 @@ public abstract class IndexReader implem
       if (terms != null) {
         final TermsEnum termsEnum = terms.iterator(null);
         termsEnum.seekExact(term, state);
-        return termsEnum.docs(liveDocs, null);
+        return termsEnum.docs(liveDocs, null, needsFreqs);
       }
     }
     return null;
@@ -1093,7 +1093,7 @@ public abstract class IndexReader implem
    * Returns {@link DocsAndPositionsEnum} for the specified field and
    * {@link TermState}. This may return null, if either the field or the term
    * does not exists, the {@link TermState} is invalid for the underlying
-   * implementation, or positions were not stored for this term.*/
+   * implementation, or positions were not indexed for this field. */
   public DocsAndPositionsEnum termPositionsEnum(Bits liveDocs, String field, BytesRef term, TermState state) throws IOException {
     assert state != null;
     assert field != null;
@@ -1161,8 +1161,11 @@ public abstract class IndexReader implem
     DocsEnum docs = MultiFields.getTermDocsEnum(this,
                                                 MultiFields.getLiveDocs(this),
                                                 term.field(),
-                                                term.bytes());
-    if (docs == null) return 0;
+                                                term.bytes(),
+                                                false);
+    if (docs == null) {
+      return 0;
+    }
     int n = 0;
     int doc;
     while ((doc = docs.nextDoc()) != DocsEnum.NO_MORE_DOCS) {

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiFields.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiFields.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiFields.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiFields.java Fri Dec  9 02:19:42 2011
@@ -151,14 +151,14 @@ public final class MultiFields extends F
   /** Returns {@link DocsEnum} for the specified field &
    *  term.  This may return null if the term does not
    *  exist. */
-  public static DocsEnum getTermDocsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term) throws IOException {
+  public static DocsEnum getTermDocsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term, boolean needsFreqs) throws IOException {
     assert field != null;
     assert term != null;
     final Terms terms = getTerms(r, field);
     if (terms != null) {
       final TermsEnum termsEnum = terms.iterator(null);
       if (termsEnum.seekExact(term, true)) {
-        return termsEnum.docs(liveDocs, null);
+        return termsEnum.docs(liveDocs, null, needsFreqs);
       }
     }
     return null;

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiTermsEnum.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiTermsEnum.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/MultiTermsEnum.java Fri Dec  9 02:19:42 2011
@@ -347,7 +347,7 @@ public final class MultiTermsEnum extend
   }
 
   @Override
-  public DocsEnum docs(Bits liveDocs, DocsEnum reuse) throws IOException {
+  public DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) throws IOException {
     MultiDocsEnum docsEnum;
     // Can only reuse if incoming enum is also a MultiDocsEnum
     if (reuse != null && reuse instanceof MultiDocsEnum) {
@@ -397,14 +397,16 @@ public final class MultiTermsEnum extend
       }
 
       assert entry.index < docsEnum.subDocsEnum.length: entry.index + " vs " + docsEnum.subDocsEnum.length + "; " + subs.length;
-      final DocsEnum subDocsEnum = entry.terms.docs(b, docsEnum.subDocsEnum[entry.index]);
-
+      final DocsEnum subDocsEnum = entry.terms.docs(b, docsEnum.subDocsEnum[entry.index], needsFreqs);
       if (subDocsEnum != null) {
         docsEnum.subDocsEnum[entry.index] = subDocsEnum;
         subDocs[upto].docsEnum = subDocsEnum;
         subDocs[upto].slice = entry.subSlice;
-
         upto++;
+      } else {
+        // One of our subs cannot provide freqs:
+        assert needsFreqs;
+        return null;
       }
     }
 
@@ -475,7 +477,7 @@ public final class MultiTermsEnum extend
         subDocsAndPositions[upto].slice = entry.subSlice;
         upto++;
       } else {
-        if (entry.terms.docs(b, null) != null) {
+        if (entry.terms.docs(b, null, false) != null) {
           // At least one of our subs does not store
           // positions -- we can't correctly produce a
           // MultiDocsAndPositions enum

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/NormsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/NormsWriter.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/NormsWriter.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/NormsWriter.java Fri Dec  9 02:19:42 2011
@@ -60,7 +60,9 @@ final class NormsWriter extends Inverted
       for (FieldInfo fi : state.fieldInfos) {
         final NormsWriterPerField toWrite = (NormsWriterPerField) fieldsToFlush.get(fi);
         int upto = 0;
-        if (toWrite != null && toWrite.upto > 0) {
+        // we must check the final value of omitNorms for the fieldinfo, it could have 
+        // changed for this field since the first time we added it.
+        if (!fi.omitNorms && toWrite != null && toWrite.upto > 0) {
           normCount++;
 
           int docID = 0;
@@ -84,7 +86,7 @@ final class NormsWriter extends Inverted
             normsOut.writeByte((byte) 0);
         }
 
-        assert 4+normCount*state.numDocs == normsOut.getFilePointer() : ".nrm file size mismatch: expected=" + (4+normCount*state.numDocs) + " actual=" + normsOut.getFilePointer();
+        assert 4+normCount*(long)state.numDocs == normsOut.getFilePointer() : ".nrm file size mismatch: expected=" + (4+normCount*(long)state.numDocs) + " actual=" + normsOut.getFilePointer();
       }
       success = true;
     } finally {

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentMerger.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentMerger.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentMerger.java Fri Dec  9 02:19:42 2011
@@ -31,6 +31,7 @@ import org.apache.lucene.index.codecs.Fi
 import org.apache.lucene.index.codecs.StoredFieldsWriter;
 import org.apache.lucene.index.codecs.PerDocConsumer;
 import org.apache.lucene.index.codecs.TermVectorsWriter;
+import org.apache.lucene.index.values.ValueType;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexOutput;
@@ -202,7 +203,11 @@ final class SegmentMerger {
         addIndexed(reader, mergeState.fieldInfos, reader.getFieldNames(FieldOption.STORES_PAYLOADS), false, false, false, true, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
         addIndexed(reader, mergeState.fieldInfos, reader.getFieldNames(FieldOption.INDEXED), false, false, false, false, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
         mergeState.fieldInfos.addOrUpdate(reader.getFieldNames(FieldOption.UNINDEXED), false);
-        mergeState.fieldInfos.addOrUpdate(reader.getFieldNames(FieldOption.DOC_VALUES), false);
+        Collection<String> dvNames = reader.getFieldNames(FieldOption.DOC_VALUES);
+        mergeState.fieldInfos.addOrUpdate(dvNames, false);
+        for (String dvName : dvNames) {
+          mergeState.fieldInfos.fieldInfo(dvName).setDocValues(reader.docValues(dvName).type());
+        }
       }
     }
   }

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentReader.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentReader.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/SegmentReader.java Fri Dec  9 02:19:42 2011
@@ -536,6 +536,9 @@ public class SegmentReader extends Index
       else if ((fi.storeOffsetWithTermVector && fi.storePositionWithTermVector) &&
                 fieldOption == IndexReader.FieldOption.TERMVECTOR_WITH_POSITION_OFFSET) {
         fieldSet.add(fi.name);
+      } 
+      else if (fi.hasDocValues() && fieldOption == IndexReader.FieldOption.DOC_VALUES) {
+        fieldSet.add(fi.name);
       }
     }
     return fieldSet;
@@ -572,6 +575,7 @@ public class SegmentReader extends Index
   }
 
   private void openNorms(Directory cfsDir, IOContext context) throws IOException {
+    boolean normsInitiallyEmpty = norms.isEmpty(); // only used for assert
     long nextNormSeek = SegmentNorms.NORMS_HEADER.length; //skip header (header unused for now)
     int maxDoc = maxDoc();
     for (FieldInfo fi : core.fieldInfos) {
@@ -625,6 +629,7 @@ public class SegmentReader extends Index
         nextNormSeek += maxDoc; // increment also if some norms are separate
       }
     }
+    assert singleNormStream == null || !normsInitiallyEmpty || nextNormSeek == singleNormStream.length();
   }
 
   // for testing only

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/TermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/TermsEnum.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/TermsEnum.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/TermsEnum.java Fri Dec  9 02:19:42 2011
@@ -147,12 +147,16 @@ public abstract class TermsEnum {
 
   /** Get {@link DocsEnum} for the current term.  Do not
    *  call this when the enum is unpositioned.  This method
-   *  will not return null.
+   *  may return null (if needsFreqs is true but freqs were
+   *  not indexed for this field).
    *  
    * @param liveDocs unset bits are documents that should not
    * be returned
-   * @param reuse pass a prior DocsEnum for possible reuse */
-  public abstract DocsEnum docs(Bits liveDocs, DocsEnum reuse) throws IOException;
+   * @param reuse pass a prior DocsEnum for possible reuse
+   * @param needsFreqs true if the caller intends to call
+   * {@link DocsEnum#freq}.  If you pass false you must not
+   * call {@link DocsEnum#freq} in the returned DocsEnum. */
+  public abstract DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) throws IOException;
 
   /** Get {@link DocsAndPositionsEnum} for the current term.
    *  Do not call this when the enum is unpositioned.
@@ -229,7 +233,7 @@ public abstract class TermsEnum {
     }
 
     @Override
-    public DocsEnum docs(Bits liveDocs, DocsEnum reuse) {
+    public DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) {
       throw new IllegalStateException("this method should never be called");
     }
       

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java Fri Dec  9 02:19:42 2011
@@ -25,8 +25,8 @@ import java.util.TreeMap;
 
 import org.apache.lucene.index.DocsAndPositionsEnum;
 import org.apache.lucene.index.DocsEnum;
-import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
+import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfos;
 import org.apache.lucene.index.FieldsEnum;
 import org.apache.lucene.index.IndexFileNames;
@@ -689,14 +689,11 @@ public class BlockTermsReader extends Fi
       }
 
       @Override
-      public DocsEnum docs(Bits liveDocs, DocsEnum reuse) throws IOException {
+      public DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) throws IOException {
         //System.out.println("BTR.docs this=" + this);
         decodeMetaData();
         //System.out.println("BTR.docs:  state.docFreq=" + state.docFreq);
-        final DocsEnum docsEnum = postingsReader.docs(fieldInfo, state, liveDocs, reuse);
-        assert docsEnum != null;
-        //System.out.println("BTR.docs:  return docsEnum=" + docsEnum);
-        return docsEnum;
+        return postingsReader.docs(fieldInfo, state, liveDocs, reuse, needsFreqs);
       }
 
       @Override

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsReader.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsReader.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsReader.java Fri Dec  9 02:19:42 2011
@@ -166,16 +166,16 @@ public class BlockTreeTermsReader extend
   }
 
   protected void readHeader(IndexInput input) throws IOException {
-    CodecUtil.checkHeader(input, BlockTreeTermsWriter.CODEC_NAME,
-                          BlockTreeTermsWriter.VERSION_START,
-                          BlockTreeTermsWriter.VERSION_CURRENT);
+    CodecUtil.checkHeader(input, BlockTreeTermsWriter.TERMS_CODEC_NAME,
+                          BlockTreeTermsWriter.TERMS_VERSION_START,
+                          BlockTreeTermsWriter.TERMS_VERSION_CURRENT);
     dirOffset = input.readLong();    
   }
 
   protected void readIndexHeader(IndexInput input) throws IOException {
-    CodecUtil.checkHeader(input, BlockTreeTermsWriter.CODEC_NAME,
-                          BlockTreeTermsWriter.VERSION_START,
-                          BlockTreeTermsWriter.VERSION_CURRENT);
+    CodecUtil.checkHeader(input, BlockTreeTermsWriter.TERMS_INDEX_CODEC_NAME,
+                          BlockTreeTermsWriter.TERMS_INDEX_VERSION_START,
+                          BlockTreeTermsWriter.TERMS_INDEX_VERSION_CURRENT);
     indexDirOffset = input.readLong();    
   }
   
@@ -875,9 +875,9 @@ public class BlockTreeTermsReader extend
       }
 
       @Override
-      public DocsEnum docs(Bits skipDocs, DocsEnum reuse) throws IOException {
+      public DocsEnum docs(Bits skipDocs, DocsEnum reuse, boolean needsFreqs) throws IOException {
         currentFrame.decodeMetaData();
-        return postingsReader.docs(fieldInfo, currentFrame.termState, skipDocs, reuse);
+        return postingsReader.docs(fieldInfo, currentFrame.termState, skipDocs, reuse, needsFreqs);
       }
 
       @Override
@@ -2082,7 +2082,7 @@ public class BlockTreeTermsReader extend
       }
 
       @Override
-      public DocsEnum docs(Bits skipDocs, DocsEnum reuse) throws IOException {
+      public DocsEnum docs(Bits skipDocs, DocsEnum reuse, boolean needsFreqs) throws IOException {
         assert !eof;
         //if (DEBUG) {
         //System.out.println("BTTR.docs seg=" + segment);
@@ -2091,10 +2091,7 @@ public class BlockTreeTermsReader extend
         //if (DEBUG) {
         //System.out.println("  state=" + currentFrame.state);
         //}
-        final DocsEnum docsEnum = postingsReader.docs(fieldInfo, currentFrame.state, skipDocs, reuse);
-
-        assert docsEnum != null;
-        return docsEnum;
+        return postingsReader.docs(fieldInfo, currentFrame.state, skipDocs, reuse, needsFreqs);
       }
 
       @Override

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsWriter.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsWriter.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/BlockTreeTermsWriter.java Fri Dec  9 02:19:42 2011
@@ -99,18 +99,21 @@ public class BlockTreeTermsWriter extend
   static final int OUTPUT_FLAG_IS_FLOOR = 0x1;
   static final int OUTPUT_FLAG_HAS_TERMS = 0x2;
 
-  final static String CODEC_NAME = "BLOCK_TREE_TERMS_DICT";
-
-  // Initial format
-  public static final int VERSION_START = 0;
-
-  public static final int VERSION_CURRENT = VERSION_START;
-
   /** Extension of terms file */
   static final String TERMS_EXTENSION = "tim";
+  final static String TERMS_CODEC_NAME = "BLOCK_TREE_TERMS_DICT";
+  // Initial format
+  public static final int TERMS_VERSION_START = 0;
+  public static final int TERMS_VERSION_CURRENT = TERMS_VERSION_START;
+
+  /** Extension of terms index file */
   static final String TERMS_INDEX_EXTENSION = "tip";
+  final static String TERMS_INDEX_CODEC_NAME = "BLOCK_TREE_TERMS_INDEX";
+  // Initial format
+  public static final int TERMS_INDEX_VERSION_START = 0;
+  public static final int TERMS_INDEX_VERSION_CURRENT = TERMS_INDEX_VERSION_START;
 
-  protected final IndexOutput out;
+  private final IndexOutput out;
   private final IndexOutput indexOut;
   final int minItemsInBlock;
   final int maxItemsInBlock;
@@ -178,22 +181,22 @@ public class BlockTreeTermsWriter extend
   }
   
   protected void writeHeader(IndexOutput out) throws IOException {
-    CodecUtil.writeHeader(out, CODEC_NAME, VERSION_CURRENT); 
+    CodecUtil.writeHeader(out, TERMS_CODEC_NAME, TERMS_VERSION_CURRENT); 
     out.writeLong(0);                             // leave space for end index pointer    
   }
 
   protected void writeIndexHeader(IndexOutput out) throws IOException {
-    CodecUtil.writeHeader(out, CODEC_NAME, VERSION_CURRENT); 
+    CodecUtil.writeHeader(out, TERMS_INDEX_CODEC_NAME, TERMS_INDEX_VERSION_CURRENT); 
     out.writeLong(0);                             // leave space for end index pointer    
   }
 
-  protected void writeTrailer(long dirStart) throws IOException {
-    out.seek(CodecUtil.headerLength(CODEC_NAME));
+  protected void writeTrailer(IndexOutput out, long dirStart) throws IOException {
+    out.seek(CodecUtil.headerLength(TERMS_CODEC_NAME));
     out.writeLong(dirStart);    
   }
 
-  protected void writeIndexTrailer(long dirStart) throws IOException {
-    indexOut.seek(CodecUtil.headerLength(CODEC_NAME));
+  protected void writeIndexTrailer(IndexOutput indexOut, long dirStart) throws IOException {
+    indexOut.seek(CodecUtil.headerLength(TERMS_INDEX_CODEC_NAME));
     indexOut.writeLong(dirStart);    
   }
   
@@ -935,8 +938,8 @@ public class BlockTreeTermsWriter extend
           indexOut.writeVLong(field.indexStartFP);
         }
       }
-      writeTrailer(dirStart);
-      writeIndexTrailer(indexDirStart);
+      writeTrailer(out, dirStart);
+      writeIndexTrailer(indexOut, indexDirStart);
     } catch (IOException ioe2) {
       ioe = ioe2;
     } finally {

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsConsumer.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsConsumer.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsConsumer.java Fri Dec  9 02:19:42 2011
@@ -63,7 +63,19 @@ public abstract class PostingsConsumer {
     int df = 0;
     long totTF = 0;
 
-    if (mergeState.fieldInfo.indexOptions != IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) {
+    if (mergeState.fieldInfo.indexOptions == IndexOptions.DOCS_ONLY) {
+      while(true) {
+        final int doc = postings.nextDoc();
+        if (doc == DocIdSetIterator.NO_MORE_DOCS) {
+          break;
+        }
+        visitedDocs.set(doc);
+        this.startDoc(doc, 0);
+        this.finishDoc();
+        df++;
+      }
+      totTF = -1;
+    } else if (mergeState.fieldInfo.indexOptions == IndexOptions.DOCS_AND_FREQS) {
       while(true) {
         final int doc = postings.nextDoc();
         if (doc == DocIdSetIterator.NO_MORE_DOCS) {

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsReaderBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsReaderBase.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsReaderBase.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/PostingsReaderBase.java Fri Dec  9 02:19:42 2011
@@ -51,7 +51,7 @@ public abstract class PostingsReaderBase
 
   /** Must fully consume state, since after this call that
    *  TermState may be reused. */
-  public abstract DocsEnum docs(FieldInfo fieldInfo, BlockTermState state, Bits skipDocs, DocsEnum reuse) throws IOException;
+  public abstract DocsEnum docs(FieldInfo fieldInfo, BlockTermState state, Bits skipDocs, DocsEnum reuse, boolean needsFreqs) throws IOException;
 
   /** Must fully consume state, since after this call that
    *  TermState may be reused. */

Modified: lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/TermsConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/TermsConsumer.java?rev=1212221&r1=1212220&r2=1212221&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/TermsConsumer.java (original)
+++ lucene/dev/branches/solrcloud/lucene/src/java/org/apache/lucene/index/codecs/TermsConsumer.java Fri Dec  9 02:19:42 2011
@@ -51,8 +51,9 @@ public abstract class TermsConsumer {
   public abstract Comparator<BytesRef> getComparator() throws IOException;
 
   /** Default merge impl */
-  private MappingMultiDocsEnum docsEnum = null;
-  private MappingMultiDocsAndPositionsEnum postingsEnum = null;
+  private MappingMultiDocsEnum docsEnum;
+  private MappingMultiDocsEnum docsAndFreqsEnum;
+  private MappingMultiDocsAndPositionsEnum postingsEnum;
 
   public void merge(MergeState mergeState, TermsEnum termsEnum) throws IOException {
 
@@ -63,7 +64,7 @@ public abstract class TermsConsumer {
     long sumDFsinceLastAbortCheck = 0;
     FixedBitSet visitedDocs = new FixedBitSet(mergeState.mergedDocCount);
 
-    if (mergeState.fieldInfo.indexOptions != IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) {
+    if (mergeState.fieldInfo.indexOptions == IndexOptions.DOCS_ONLY) {
       if (docsEnum == null) {
         docsEnum = new MappingMultiDocsEnum();
       }
@@ -74,14 +75,14 @@ public abstract class TermsConsumer {
       while((term = termsEnum.next()) != null) {
         // We can pass null for liveDocs, because the
         // mapping enum will skip the non-live docs:
-        docsEnumIn = (MultiDocsEnum) termsEnum.docs(null, docsEnumIn);
+        docsEnumIn = (MultiDocsEnum) termsEnum.docs(null, docsEnumIn, false);
         if (docsEnumIn != null) {
           docsEnum.reset(docsEnumIn);
           final PostingsConsumer postingsConsumer = startTerm(term);
           final TermStats stats = postingsConsumer.merge(mergeState, docsEnum, visitedDocs);
           if (stats.docFreq > 0) {
             finishTerm(term, stats);
-            sumTotalTermFreq += stats.totalTermFreq;
+            sumTotalTermFreq += stats.docFreq;
             sumDFsinceLastAbortCheck += stats.docFreq;
             sumDocFreq += stats.docFreq;
             if (sumDFsinceLastAbortCheck > 60000) {
@@ -91,7 +92,35 @@ public abstract class TermsConsumer {
           }
         }
       }
+    } else if (mergeState.fieldInfo.indexOptions == IndexOptions.DOCS_AND_FREQS) {
+      if (docsAndFreqsEnum == null) {
+        docsAndFreqsEnum = new MappingMultiDocsEnum();
+      }
+      docsAndFreqsEnum.setMergeState(mergeState);
+
+      MultiDocsEnum docsAndFreqsEnumIn = null;
+
+      while((term = termsEnum.next()) != null) {
+        // We can pass null for liveDocs, because the
+        // mapping enum will skip the non-live docs:
+        docsAndFreqsEnumIn = (MultiDocsEnum) termsEnum.docs(null, docsAndFreqsEnumIn, true);
+        assert docsAndFreqsEnumIn != null;
+        docsAndFreqsEnum.reset(docsAndFreqsEnumIn);
+        final PostingsConsumer postingsConsumer = startTerm(term);
+        final TermStats stats = postingsConsumer.merge(mergeState, docsAndFreqsEnum, visitedDocs);
+        if (stats.docFreq > 0) {
+          finishTerm(term, stats);
+          sumTotalTermFreq += stats.totalTermFreq;
+          sumDFsinceLastAbortCheck += stats.docFreq;
+          sumDocFreq += stats.docFreq;
+          if (sumDFsinceLastAbortCheck > 60000) {
+            mergeState.checkAbort.work(sumDFsinceLastAbortCheck/5.0);
+            sumDFsinceLastAbortCheck = 0;
+          }
+        }
+      }
     } else {
+      assert mergeState.fieldInfo.indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
       if (postingsEnum == null) {
         postingsEnum = new MappingMultiDocsAndPositionsEnum();
       }
@@ -101,27 +130,26 @@ public abstract class TermsConsumer {
         // We can pass null for liveDocs, because the
         // mapping enum will skip the non-live docs:
         postingsEnumIn = (MultiDocsAndPositionsEnum) termsEnum.docsAndPositions(null, postingsEnumIn);
-        if (postingsEnumIn != null) {
-          postingsEnum.reset(postingsEnumIn);
-          // set PayloadProcessor
-          if (mergeState.payloadProcessorProvider != null) {
-            for (int i = 0; i < mergeState.readers.size(); i++) {
-              if (mergeState.dirPayloadProcessor[i] != null) {
-                mergeState.currentPayloadProcessor[i] = mergeState.dirPayloadProcessor[i].getProcessor(mergeState.fieldInfo.name, term);
-              }
+        assert postingsEnumIn != null;
+        postingsEnum.reset(postingsEnumIn);
+        // set PayloadProcessor
+        if (mergeState.payloadProcessorProvider != null) {
+          for (int i = 0; i < mergeState.readers.size(); i++) {
+            if (mergeState.dirPayloadProcessor[i] != null) {
+              mergeState.currentPayloadProcessor[i] = mergeState.dirPayloadProcessor[i].getProcessor(mergeState.fieldInfo.name, term);
             }
           }
-          final PostingsConsumer postingsConsumer = startTerm(term);
-          final TermStats stats = postingsConsumer.merge(mergeState, postingsEnum, visitedDocs);
-          if (stats.docFreq > 0) {
-            finishTerm(term, stats);
-            sumTotalTermFreq += stats.totalTermFreq;
-            sumDFsinceLastAbortCheck += stats.docFreq;
-            sumDocFreq += stats.docFreq;
-            if (sumDFsinceLastAbortCheck > 60000) {
-              mergeState.checkAbort.work(sumDFsinceLastAbortCheck/5.0);
-              sumDFsinceLastAbortCheck = 0;
-            }
+        }
+        final PostingsConsumer postingsConsumer = startTerm(term);
+        final TermStats stats = postingsConsumer.merge(mergeState, postingsEnum, visitedDocs);
+        if (stats.docFreq > 0) {
+          finishTerm(term, stats);
+          sumTotalTermFreq += stats.totalTermFreq;
+          sumDFsinceLastAbortCheck += stats.docFreq;
+          sumDocFreq += stats.docFreq;
+          if (sumDFsinceLastAbortCheck > 60000) {
+            mergeState.checkAbort.work(sumDFsinceLastAbortCheck/5.0);
+            sumDFsinceLastAbortCheck = 0;
           }
         }
       }



Mime
View raw message