lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: svn commit: r1036080 [1/4] - in /lucene/dev/branches/docvalues: ./ lucene/ lucene/contrib/ lucene/contrib/highlighter/src/test/ lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/ lucene/contrib/misc/src/java/org/apache/lucene/i
Date Wed, 17 Nov 2010 15:55:34 GMT
JUHU,

No prop changes (only in the into, the affected files are listed, but no longer any endless pages of rev numbers!

Thanks Grant!

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: simonw@apache.org [mailto:simonw@apache.org]
> Sent: Wednesday, November 17, 2010 4:43 PM
> To: commits@lucene.apache.org
> Subject: svn commit: r1036080 [1/4] - in /lucene/dev/branches/docvalues: ./
> lucene/ lucene/contrib/ lucene/contrib/highlighter/src/test/
> lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/
> lucene/contrib/misc/src/java/org/apache/lucene/in...
> 
> Author: simonw
> Date: Wed Nov 17 15:43:06 2010
> New Revision: 1036080
> 
> URL: http://svn.apache.org/viewvc?rev=1036080&view=rev
> Log:
> catch up with trunk
> 
> Added:
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/Bo
> ostAttribute.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/BoostAttribute.ja
> va
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/Bo
> ostAttributeImpl.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/BoostAttributeIm
> pl.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/Co
> nstantScoreAutoRewrite.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/ConstantScoreAut
> oRewrite.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/M
> axNonCompetitiveBoostAttribute.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MaxNonCompetit
> iveBoostAttribute.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/M
> axNonCompetitiveBoostAttributeImpl.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MaxNonCompetit
> iveBoostAttributeImpl.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/Sc
> oringRewrite.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/ScoringRewrite.ja
> va
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/Te
> rmCollectingRewrite.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/TermCollectingR
> ewrite.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/To
> pTermsRewrite.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/TopTermsRewrit
> e.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/sp
> ans/SpanMultiTermQueryWrapper.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/spans/SpanMulti
> TermQueryWrapper.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/spa
> ns/TestSpanMultiTermQueryWrapper.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/spans/TestSpanM
> ultiTermQueryWrapper.java
>     lucene/dev/branches/docvalues/solr/contrib/analysis-
> extras/src/java/org/apache/solr/analysis/StempelPolishStemFilterFactory.java
>       - copied unchanged from r1036063, lucene/dev/trunk/solr/contrib/analysis-
> extras/src/java/org/apache/solr/analysis/StempelPolishStemFilterFactory.java
>     lucene/dev/branches/docvalues/solr/contrib/analysis-
> extras/src/test/org/apache/solr/analysis/TestStempelPolishStemFilterFactory.ja
> va
>       - copied unchanged from r1036063, lucene/dev/trunk/solr/contrib/analysis-
> extras/src/test/org/apache/solr/analysis/TestStempelPolishStemFilterFactory.ja
> va
> 
> lucene/dev/branches/docvalues/solr/src/java/org/apache/solr/util/SentinelIntS
> et.java
>       - copied unchanged from r1036063,
> lucene/dev/trunk/solr/src/java/org/apache/solr/util/SentinelIntSet.java
> Modified:
>     lucene/dev/branches/docvalues/   (props changed)
>     lucene/dev/branches/docvalues/lucene/   (props changed)
>     lucene/dev/branches/docvalues/lucene/CHANGES.txt
>     lucene/dev/branches/docvalues/lucene/MIGRATE.txt
>     lucene/dev/branches/docvalues/lucene/build.xml   (props changed)
>     lucene/dev/branches/docvalues/lucene/contrib/   (props changed)
>     lucene/dev/branches/docvalues/lucene/contrib/CHANGES.txt   (contents,
> props changed)
>     lucene/dev/branches/docvalues/lucene/contrib/highlighter/src/test/   (props
> changed)
> 
> lucene/dev/branches/docvalues/lucene/contrib/instantiated/src/test/org/apach
> e/lucene/store/instantiated/TestIndicesEquals.java   (props changed)
> 
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingCodec.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingTermsDictReader.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingTermsIndexReader.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/luce
> ne/index/codecs/appending/TestAppendingCodec.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/java/org/apache/lu
> cene/search/FuzzyLikeThisQuery.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/java/org/apache/lu
> cene/search/regex/SpanRegexQuery.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/test/org/apache/lu
> cene/search/regex/TestSpanRegexQuery.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/SingleFieldTestDb.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/Test02Boolean.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/Test03Distance.java
> 
> lucene/dev/branches/docvalues/lucene/contrib/spellchecker/src/java/org/apac
> he/lucene/search/spell/DirectSpellChecker.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/analysis/T
> okenizer.java   (props changed)
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Inde
> xFileDeleter.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Inde
> xWriter.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Per
> FieldCodecWrapper.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentCodecs.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentReadState.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentWriteState.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/Codec.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/FixedGapTermsIndexReader.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/FixedGapTermsIndexWriter.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/PrefixCodedTermsReader.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/PrefixCodedTermsWriter.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesCodec.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesConsumer.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesProducerBase.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/preflex/PreFlexCodec.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/pulsing/PulsingCodec.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/sep/SepPostingsReaderImpl.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/sep/SepPostingsWriterImpl.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextCodec.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextFieldsReader.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextFieldsWriter.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/standard/StandardCodec.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/standard/StandardPostingsReader.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/standard/StandardPostingsWriter.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/Bo
> oleanQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/Fie
> ldComparator.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/Fu
> zzyTermsEnum.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/M
> ultiTermQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/M
> ultiTermQueryWrapperFilter.java   (props changed)
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/sp
> ans/SpanFirstQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/sp
> ans/SpanNearPayloadCheckQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/sp
> ans/SpanOrQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/sp
> ans/SpanPayloadCheckQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/sp
> ans/SpanPositionCheckQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/search/sp
> ans/SpanPositionRangeQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/store/Dat
> aInput.java
> 
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/store/Dat
> aOutput.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/TestExtern
> alCodecs.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/document/
> TestDateTools.java   (props changed)
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/document/
> TestNumberTools.java   (props changed)
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> AddIndexes.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> AtomicUpdate.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> BackwardsCompatibility.java   (props changed)
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/TestI
> ndexReader.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/TestI
> ndexWriter.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/TestI
> ndexWriterDelete.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/TestI
> ndexWriterExceptions.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/TestI
> ndexWriterOnDiskFull.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/TestI
> ndexWriterReader.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> LazyProxSkipping.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> MultiLevelSkipList.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> PerFieldCodecSupport.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> TermVectorsWriter.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> ThreadedOptimize.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/Test
> Transactions.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/code
> cs/mockintblock/MockFixedIntBlockCodec.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/code
> cs/mockintblock/MockVariableIntBlockCodec.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/index/code
> cs/mocksep/MockSepCodec.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Ch
> eckHits.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Qu
> eryUtils.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Tes
> tBoolean2.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Tes
> tBooleanMinShouldMatch.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Tes
> tBooleanOr.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Tes
> tDisjunctionMaxQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Tes
> tExplanations.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Tes
> tFilteredQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Tes
> tMultiTermQueryRewrites.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/Tes
> tPhraseQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/fun
> ction/TestCustomScoreQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/fun
> ction/TestFieldScoreQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/fun
> ction/TestOrdValues.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/pay
> loads/PayloadHelper.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/pay
> loads/TestPayloadTermQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/spa
> ns/TestBasics.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/spa
> ns/TestFieldMaskingSpanQuery.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/spa
> ns/TestNearSpansOrdered.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/spa
> ns/TestPayloadSpans.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/spa
> ns/TestSpans.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/search/spa
> ns/TestSpansAdvanced.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/store/Moc
> kDirectoryWrapper.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/store/Moc
> kIndexInputWrapper.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/store/Moc
> kIndexOutputWrapper.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/store/Test
> FileSwitchDirectory.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/store/Test
> LockFactory.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/store/Test
> RAMDirectory.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/util/Lucen
> eTestCase.java
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/util/TestAt
> tributeSource.java   (props changed)
> 
> lucene/dev/branches/docvalues/lucene/src/test/org/apache/lucene/util/TestBit
> Vector.java
> 
> lucene/dev/branches/docvalues/modules/analysis/common/src/test/org/apach
> e/lucene/analysis/miscellaneous/TestISOLatin1AccentFilter.java   (props
> changed)
> 
> lucene/dev/branches/docvalues/modules/analysis/stempel/src/java/org/apach
> e/lucene/analysis/pl/PolishAnalyzer.java
> 
> lucene/dev/branches/docvalues/modules/analysis/stempel/src/java/org/apach
> e/lucene/analysis/stempel/StempelStemmer.java
>     lucene/dev/branches/docvalues/solr/   (props changed)
>     lucene/dev/branches/docvalues/solr/CHANGES.txt   (contents, props
> changed)
>     lucene/dev/branches/docvalues/solr/KEYS   (props changed)
>     lucene/dev/branches/docvalues/solr/LICENSE.txt   (props changed)
>     lucene/dev/branches/docvalues/solr/NOTICE.txt   (props changed)
>     lucene/dev/branches/docvalues/solr/README.txt   (props changed)
>     lucene/dev/branches/docvalues/solr/build.xml   (props changed)
>     lucene/dev/branches/docvalues/solr/client/   (props changed)
>     lucene/dev/branches/docvalues/solr/common-build.xml   (props changed)
>     lucene/dev/branches/docvalues/solr/contrib/   (props changed)
>     lucene/dev/branches/docvalues/solr/example/   (props changed)
>     lucene/dev/branches/docvalues/solr/lib/   (props changed)
>     lucene/dev/branches/docvalues/solr/lib/commons-httpclient-3.1.jar   (props
> changed)
>     lucene/dev/branches/docvalues/solr/lib/jcl-over-slf4j-1.5.5.jar   (props
> changed)
>     lucene/dev/branches/docvalues/solr/site/   (props changed)
>     lucene/dev/branches/docvalues/solr/src/   (props changed)
> 
> lucene/dev/branches/docvalues/solr/src/common/org/apache/solr/common/
> (props changed)
> 
> lucene/dev/branches/docvalues/solr/src/java/org/apache/solr/search/Groupin
> g.java
> 
> lucene/dev/branches/docvalues/solr/src/java/org/apache/solr/search/MissingS
> tringLastComparatorSource.java
> 
> lucene/dev/branches/docvalues/solr/src/java/org/apache/solr/search/function
> /StringIndexDocValues.java
>     lucene/dev/branches/docvalues/solr/src/maven/solr-core-pom.xml.template
> (props changed)
>     lucene/dev/branches/docvalues/solr/src/maven/solr-solrj-pom.xml.template
> (props changed)
>     lucene/dev/branches/docvalues/solr/src/solrj/org/   (props changed)
> 
> lucene/dev/branches/docvalues/solr/src/test/org/apache/solr/JSONTestUtil.jav
> a
> 
> lucene/dev/branches/docvalues/solr/src/test/org/apache/solr/SolrTestCaseJ4.j
> ava
> 
> lucene/dev/branches/docvalues/solr/src/test/org/apache/solr/TestGroupingSea
> rch.java
>     lucene/dev/branches/docvalues/solr/src/test/org/apache/solr/client/
> (props changed)
> 
> lucene/dev/branches/docvalues/solr/src/test/org/apache/solr/cloud/CloudStat
> eUpdateTest.java
> 
> lucene/dev/branches/docvalues/solr/src/webapp/src/org/apache/solr/client/so
> lrj/embedded/   (props changed)
> 
> lucene/dev/branches/docvalues/solr/src/webapp/src/org/apache/solr/servlet/
> DirectSolrConnection.java
>     lucene/dev/branches/docvalues/solr/testlogging.properties   (props changed)
> 
> Modified: lucene/dev/branches/docvalues/lucene/CHANGES.txt
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/CHANGE
> S.txt?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> --- lucene/dev/branches/docvalues/lucene/CHANGES.txt (original)
> +++ lucene/dev/branches/docvalues/lucene/CHANGES.txt Wed Nov 17 15:43:06
> 2010
> @@ -295,6 +295,10 @@ New features
>    resolved without knowing the actual codec used for writing the segment.
>    (Simon Willnauer)
> 
> +* LUCENE-2741: Add support for multiple codecs that use the same file
> +  extensions within the same segment. Codecs now use their per-segment
> codec
> +  ID in the file names. (Simon Willnauer)
> +
>  Optimizations
> 
>  * LUCENE-2410: ~20% speedup on exact (slop=0) PhraseQuery matching.
> @@ -716,6 +720,10 @@ New features
>  * LUCENE-2671: Add SortField.setMissingValue( v ) to enable sorting
>    behavior for documents that do not include the given field. (ryan)
> 
> +* LUCENE-2754, LUCENE-2757: Added a wrapper around MultiTermQueries
> +  to add span support: SpanMultiTermQueryWrapper<Q extends
> MultiTermQuery>.
> +  Using this wrapper its easy to add fuzzy/wildcard to e.g. a SpanNearQuery.
> +  (Robert Muir, Uwe Schindler)
> 
>  Optimizations
> 
> @@ -793,6 +801,9 @@ Optimizations
>    by the improved SorterTemplate class.
>    (Uwe Schindler, Robert Muir, Mike McCandless)
> 
> +* LUCENE-2760: Optimize SpanFirstQuery and SpanPositionRangeQuery.
> +  (Robert Muir)
> +
>  Build
> 
>  * LUCENE-2124: Moved the JDK-based collation support from contrib/collation
> 
> Modified: lucene/dev/branches/docvalues/lucene/MIGRATE.txt
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/MIGRAT
> E.txt?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> --- lucene/dev/branches/docvalues/lucene/MIGRATE.txt (original)
> +++ lucene/dev/branches/docvalues/lucene/MIGRATE.txt Wed Nov 17 15:43:06
> 2010
> @@ -324,3 +324,7 @@ LUCENE-1458, LUCENE-2111: Flexible Index
>    The other way round MTQ.TopTermsBooleanQueryRewrite supplys a
>    global AttributeSource to each segments TermsEnum. The TermsEnum is
> consumer
>    and gets the current minimum competitive boosts
> (MTQ.MaxNonCompetitiveBoostAttribute).
> +
> +* LUCENE-2761: DataInput.readVInt/readVLong and
> DataOutput.writeVInt/writeVLong
> +  are final. If you subclassed this code before to encode variable-length
> +  integers in some specialized way, use the Codec API instead.
> 
> Modified: lucene/dev/branches/docvalues/lucene/contrib/CHANGES.txt
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/C
> HANGES.txt?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> --- lucene/dev/branches/docvalues/lucene/contrib/CHANGES.txt (original)
> +++ lucene/dev/branches/docvalues/lucene/contrib/CHANGES.txt Wed Nov 17
> 15:43:06 2010
> @@ -177,6 +177,10 @@ API Changes
>     QueryNodeProcessorPipeline now implements the List interface, this is useful
>     if you want to extend or modify an existing pipeline. (Adriano Crestani via
> Robert Muir)
> 
> + * LUCENE-2754, LUCENE-2757: Deprecated SpanRegexQuery. Use
> +   new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery())
> instead.
> +   (Robert Muir, Uwe Schindler)
> +
>  New features
> 
>   * LUCENE-2306: Add NumericRangeFilter and NumericRangeQuery support to
> XMLQueryParser.
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingCodec.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/
> misc/src/java/org/apache/lucene/index/codecs/appending/AppendingCodec.ja
> va?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingCodec.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingCodec.java Wed Nov 17 15:43:06 2010
> @@ -1,6 +1,6 @@
>  package org.apache.lucene.index.codecs.appending;
> 
> -/*
> +/**
>   * 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.
> @@ -88,7 +88,7 @@ public class AppendingCodec extends Code
>    @Override
>    public FieldsProducer fieldsProducer(SegmentReadState state)
>            throws IOException {
> -    PostingsReaderBase docsReader = new StandardPostingsReader(state.dir,
> state.segmentInfo, state.readBufferSize);
> +    PostingsReaderBase docsReader = new StandardPostingsReader(state.dir,
> state.segmentInfo, state.readBufferSize, state.codecId);
>      TermsIndexReaderBase indexReader;
> 
>      boolean success = false;
> @@ -97,7 +97,8 @@ public class AppendingCodec extends Code
>                state.fieldInfos,
>                state.segmentInfo.name,
>                state.termsIndexDivisor,
> -              BytesRef.getUTF8SortedAsUnicodeComparator());
> +              BytesRef.getUTF8SortedAsUnicodeComparator(),
> +              state.codecId);
>        success = true;
>      } finally {
>        if (!success) {
> @@ -111,7 +112,8 @@ public class AppendingCodec extends Code
>                docsReader,
>                state.readBufferSize,
>                BytesRef.getUTF8SortedAsUnicodeComparator(),
> -              StandardCodec.TERMS_CACHE_SIZE);
> +              StandardCodec.TERMS_CACHE_SIZE,
> +              state.codecId);
>        success = true;
>        return ret;
>      } finally {
> @@ -126,11 +128,11 @@ public class AppendingCodec extends Code
>    }
> 
>    @Override
> -  public void files(Directory dir, SegmentInfo segmentInfo, Set<String> files)
> +  public void files(Directory dir, SegmentInfo segmentInfo, String codecId,
> Set<String> files)
>            throws IOException {
> -    StandardPostingsReader.files(dir, segmentInfo, files);
> -    PrefixCodedTermsReader.files(dir, segmentInfo, files);
> -    FixedGapTermsIndexReader.files(dir, segmentInfo, files);
> +    StandardPostingsReader.files(dir, segmentInfo, codecId, files);
> +    PrefixCodedTermsReader.files(dir, segmentInfo, codecId, files);
> +    FixedGapTermsIndexReader.files(dir, segmentInfo, codecId, files);
>    }
> 
>    @Override
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingTermsDictReader.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/
> misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsDi
> ctReader.java?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingTermsDictReader.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingTermsDictReader.java Wed Nov 17
> 15:43:06 2010
> @@ -35,9 +35,9 @@ public class AppendingTermsDictReader ex
>    public AppendingTermsDictReader(TermsIndexReaderBase indexReader,
>            Directory dir, FieldInfos fieldInfos, String segment,
>            PostingsReaderBase postingsReader, int readBufferSize,
> -          Comparator<BytesRef> termComp, int termsCacheSize) throws
> IOException {
> +          Comparator<BytesRef> termComp, int termsCacheSize, String codecId)
> throws IOException {
>      super(indexReader, dir, fieldInfos, segment, postingsReader, readBufferSize,
> -            termComp, termsCacheSize);
> +            termComp, termsCacheSize, codecId);
>    }
> 
>    @Override
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingTermsIndexReader.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/
> misc/src/java/org/apache/lucene/index/codecs/appending/AppendingTermsInd
> exReader.java?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingTermsIndexReader.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/java/org/apache/luce
> ne/index/codecs/appending/AppendingTermsIndexReader.java Wed Nov 17
> 15:43:06 2010
> @@ -30,9 +30,9 @@ import org.apache.lucene.util.CodecUtil;
>  public class AppendingTermsIndexReader extends FixedGapTermsIndexReader
> {
> 
>    public AppendingTermsIndexReader(Directory dir, FieldInfos fieldInfos,
> -          String segment, int indexDivisor, Comparator<BytesRef> termComp)
> +          String segment, int indexDivisor, Comparator<BytesRef> termComp,
> String codecId)
>            throws IOException {
> -    super(dir, fieldInfos, segment, indexDivisor, termComp);
> +    super(dir, fieldInfos, segment, indexDivisor, termComp, codecId);
>    }
> 
>    @Override
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/luce
> ne/index/codecs/appending/TestAppendingCodec.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/
> misc/src/test/org/apache/lucene/index/codecs/appending/TestAppendingCode
> c.java?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/luce
> ne/index/codecs/appending/TestAppendingCodec.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/misc/src/test/org/apache/luce
> ne/index/codecs/appending/TestAppendingCodec.java Wed Nov 17 15:43:06
> 2010
> @@ -18,6 +18,7 @@ package org.apache.lucene.index.codecs.a
>   */
> 
>  import java.io.IOException;
> +import java.util.Random;
> 
>  import org.apache.lucene.analysis.MockAnalyzer;
>  import org.apache.lucene.document.Document;
> @@ -118,8 +119,8 @@ public class TestAppendingCodec extends
>    @SuppressWarnings("serial")
>    private static class AppendingRAMDirectory extends MockDirectoryWrapper
> {
> 
> -    public AppendingRAMDirectory(Directory delegate) {
> -      super(delegate);
> +    public AppendingRAMDirectory(Random random, Directory delegate) {
> +      super(random, delegate);
>      }
> 
>      @Override
> @@ -132,7 +133,7 @@ public class TestAppendingCodec extends
>    private static final String text = "the quick brown fox jumped over the lazy
> dog";
> 
>    public void testCodec() throws Exception {
> -    Directory dir = new AppendingRAMDirectory(new RAMDirectory());
> +    Directory dir = new AppendingRAMDirectory(random, new
> RAMDirectory());
>      IndexWriterConfig cfg = new IndexWriterConfig(Version.LUCENE_40, new
> MockAnalyzer());
> 
>      cfg.setCodecProvider(new AppendingCodecProvider());
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/java/org/apache/lu
> cene/search/FuzzyLikeThisQuery.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/q
> ueries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java?rev=10360
> 80&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/java/org/apache/lu
> cene/search/FuzzyLikeThisQuery.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/java/org/apache/lu
> cene/search/FuzzyLikeThisQuery.java Wed Nov 17 15:43:06 2010
> @@ -201,16 +201,16 @@ public class FuzzyLikeThisQuery extends
>                    float minScore=0;
>                    Term startTerm=internSavingTemplateTerm.createTerm(term);
>                    AttributeSource atts = new AttributeSource();
> -                  MultiTermQuery.MaxNonCompetitiveBoostAttribute maxBoostAtt =
> -
> atts.addAttribute(MultiTermQuery.MaxNonCompetitiveBoostAttribute.class);
> +                  MaxNonCompetitiveBoostAttribute maxBoostAtt =
> +                    atts.addAttribute(MaxNonCompetitiveBoostAttribute.class);
>                    FuzzyTermsEnum fe = new FuzzyTermsEnum(reader, atts,
> startTerm, f.minSimilarity, f.prefixLength);
>                    //store the df so all variants use same idf
>                    int df = reader.docFreq(startTerm);
>                    int numVariants=0;
>                    int totalVariantDocFreqs=0;
>                    BytesRef possibleMatch;
> -                  MultiTermQuery.BoostAttribute boostAtt =
> -                    fe.attributes().addAttribute(MultiTermQuery.BoostAttribute.class);
> +                  BoostAttribute boostAtt =
> +                    fe.attributes().addAttribute(BoostAttribute.class);
>                    while ((possibleMatch = fe.next()) != null) {
>                        if (possibleMatch!=null) {
>                          numVariants++;
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/java/org/apache/lu
> cene/search/regex/SpanRegexQuery.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/q
> ueries/src/java/org/apache/lucene/search/regex/SpanRegexQuery.java?rev=1
> 036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/java/org/apache/lu
> cene/search/regex/SpanRegexQuery.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/java/org/apache/lu
> cene/search/regex/SpanRegexQuery.java Wed Nov 17 15:43:06 2010
> @@ -18,115 +18,29 @@ package org.apache.lucene.search.regex;
>   */
> 
>  import org.apache.lucene.index.Term;
> -import org.apache.lucene.index.IndexReader;
> -import org.apache.lucene.search.MultiTermQuery;
> -import org.apache.lucene.search.Query;
> -import org.apache.lucene.search.BooleanQuery;
> -import org.apache.lucene.search.BooleanClause;
> -import org.apache.lucene.search.TermQuery;
> -import org.apache.lucene.search.spans.SpanOrQuery;
> -import org.apache.lucene.search.spans.SpanQuery;
> -import org.apache.lucene.search.spans.SpanTermQuery;
> -import org.apache.lucene.search.spans.Spans;
> -import org.apache.lucene.util.ToStringUtils;
> -
> -import java.io.IOException;
> -import java.util.Collection;
> -import java.util.ArrayList;
> +import org.apache.lucene.search.spans.SpanMultiTermQueryWrapper;
> 
>  /**
>   * A SpanQuery version of {@link RegexQuery} allowing regular expression
>   * queries to be nested within other SpanQuery subclasses.
> + * @deprecated Use <code>new
> SpanMultiTermQueryWrapper&lt;RegexQuery&gt;(new RegexQuery())</code>
> instead.
> + * This query will be removed in Lucene 4.0
>   */
> -public class SpanRegexQuery extends SpanQuery implements
> RegexQueryCapable {
> -  private RegexCapabilities regexImpl = new JavaUtilRegexCapabilities();
> -  private Term term;
> +@Deprecated
> +public class SpanRegexQuery extends
> SpanMultiTermQueryWrapper<RegexQuery> implements RegexQueryCapable
> {
> +  private final RegexCapabilities regexImpl = new JavaUtilRegexCapabilities();
> 
>    public SpanRegexQuery(Term term) {
> -    this.term = term;
> +    super(new RegexQuery(term));
>    }
> 
> -  public Term getTerm() { return term; }
> -
> -  @Override
> -  public Query rewrite(IndexReader reader) throws IOException {
> -    RegexQuery orig = new RegexQuery(term);
> -    orig.setRegexImplementation(regexImpl);
> -
> orig.setRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRIT
> E);
> -    BooleanQuery bq = (BooleanQuery) orig.rewrite(reader);
> -
> -    BooleanClause[] clauses = bq.getClauses();
> -    SpanQuery[] sqs = new SpanQuery[clauses.length];
> -    for (int i = 0; i < clauses.length; i++) {
> -      BooleanClause clause = clauses[i];
> -
> -      // Clauses from RegexQuery.rewrite are always TermQuery's
> -      TermQuery tq = (TermQuery) clause.getQuery();
> -
> -      sqs[i] = new SpanTermQuery(tq.getTerm());
> -      sqs[i].setBoost(tq.getBoost());
> -    }
> -
> -    SpanOrQuery query = new SpanOrQuery(sqs);
> -    query.setBoost(orig.getBoost());
> -
> -    return query;
> -  }
> -
> -  @Override
> -  public Spans getSpans(IndexReader reader) throws IOException {
> -    throw new UnsupportedOperationException("Query should have been
> rewritten");
> -  }
> -
> -  @Override
> -  public String getField() {
> -    return term.field();
> -  }
> -
> -  public Collection<Term> getTerms() {
> -    Collection<Term> terms = new ArrayList<Term>();
> -    terms.add(term);
> -    return terms;
> -  }
> -
> -  /* generated by IntelliJ IDEA */
> -  @Override
> -  public boolean equals(Object o) {
> -    if (this == o) return true;
> -    if (o == null || getClass() != o.getClass()) return false;
> -
> -    final SpanRegexQuery that = (SpanRegexQuery) o;
> -
> -    if (!regexImpl.equals(that.regexImpl)) return false;
> -    if (!term.equals(that.term)) return false;
> -
> -    return true;
> -  }
> -
> -  /* generated by IntelliJ IDEA */
> -  @Override
> -  public int hashCode() {
> -    int result;
> -    result = regexImpl.hashCode();
> -    result = 29 * result + term.hashCode();
> -    return result;
> -  }
> -
> -  @Override
> -  public String toString(String field) {
> -    StringBuilder buffer = new StringBuilder();
> -    buffer.append("spanRegexQuery(");
> -    buffer.append(term);
> -    buffer.append(")");
> -    buffer.append(ToStringUtils.boost(getBoost()));
> -    return buffer.toString();
> -  }
> +  public Term getTerm() { return query.getTerm(); }
> 
>    public void setRegexImplementation(RegexCapabilities impl) {
> -    this.regexImpl = impl;
> +    query.setRegexImplementation(impl);
>    }
> 
>    public RegexCapabilities getRegexImplementation() {
> -    return regexImpl;
> +    return query.getRegexImplementation();
>    }
>  }
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/test/org/apache/lu
> cene/search/regex/TestSpanRegexQuery.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/q
> ueries/src/test/org/apache/lucene/search/regex/TestSpanRegexQuery.java?re
> v=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/test/org/apache/lu
> cene/search/regex/TestSpanRegexQuery.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/queries/src/test/org/apache/lu
> cene/search/regex/TestSpanRegexQuery.java Wed Nov 17 15:43:06 2010
> @@ -29,6 +29,7 @@ import org.apache.lucene.index.IndexWrit
>  import org.apache.lucene.search.IndexSearcher;
>  import org.apache.lucene.search.MultiSearcher;
>  import org.apache.lucene.search.spans.SpanFirstQuery;
> +import org.apache.lucene.search.spans.SpanMultiTermQueryWrapper;
>  import org.apache.lucene.search.spans.SpanNearQuery;
>  import org.apache.lucene.search.spans.SpanQuery;
>  import org.apache.lucene.store.Directory;
> @@ -74,6 +75,65 @@ public class TestSpanRegexQuery extends
>      writer.close();
> 
>      IndexSearcher searcher = new IndexSearcher(directory, true);
> +    SpanQuery srq = new SpanMultiTermQueryWrapper<RegexQuery>(new
> RegexQuery(new Term("field", "aut.*")));
> +    SpanFirstQuery sfq = new SpanFirstQuery(srq, 1);
> +    // SpanNearQuery query = new SpanNearQuery(new SpanQuery[] {srq, stq},
> 6,
> +    // true);
> +    int numHits = searcher.search(sfq, null, 1000).totalHits;
> +    assertEquals(1, numHits);
> +    searcher.close();
> +    directory.close();
> +  }
> +
> +  public void testSpanRegexBug() throws CorruptIndexException, IOException {
> +    createRAMDirectories();
> +
> +    SpanQuery srq = new SpanMultiTermQueryWrapper<RegexQuery>(new
> RegexQuery(new Term("field", "a.*")));
> +    SpanQuery stq = new SpanMultiTermQueryWrapper<RegexQuery>(new
> RegexQuery(new Term("field", "b.*")));
> +    SpanNearQuery query = new SpanNearQuery(new SpanQuery[] { srq, stq },
> 6,
> +        true);
> +
> +    // 1. Search the same store which works
> +    IndexSearcher[] arrSearcher = new IndexSearcher[2];
> +    arrSearcher[0] = new IndexSearcher(indexStoreA, true);
> +    arrSearcher[1] = new IndexSearcher(indexStoreB, true);
> +    MultiSearcher searcher = new MultiSearcher(arrSearcher);
> +    int numHits = searcher.search(query, null, 1000).totalHits;
> +    arrSearcher[0].close();
> +    arrSearcher[1].close();
> +
> +    // Will fail here
> +    // We expect 2 but only one matched
> +    // The rewriter function only write it once on the first IndexSearcher
> +    // So it's using term: a1 b1 to search on the second IndexSearcher
> +    // As a result, it won't match the document in the second IndexSearcher
> +    assertEquals(2, numHits);
> +    indexStoreA.close();
> +    indexStoreB.close();
> +  }
> +
> +  /** remove in lucene 4.0 */
> +  @Deprecated
> +  public void testSpanRegexOld() throws Exception {
> +    Directory directory = newDirectory();
> +    IndexWriter writer = new IndexWriter(directory, newIndexWriterConfig(
> +        TEST_VERSION_CURRENT, new MockAnalyzer()));
> +    Document doc = new Document();
> +    // doc.add(newField("field", "the quick brown fox jumps over the lazy dog",
> +    // Field.Store.NO, Field.Index.ANALYZED));
> +    // writer.addDocument(doc);
> +    // doc = new Document();
> +    doc.add(newField("field", "auto update", Field.Store.NO,
> +        Field.Index.ANALYZED));
> +    writer.addDocument(doc);
> +    doc = new Document();
> +    doc.add(newField("field", "first auto update", Field.Store.NO,
> +        Field.Index.ANALYZED));
> +    writer.addDocument(doc);
> +    writer.optimize();
> +    writer.close();
> +
> +    IndexSearcher searcher = new IndexSearcher(directory, true);
>      SpanRegexQuery srq = new SpanRegexQuery(new Term("field", "aut.*"));
>      SpanFirstQuery sfq = new SpanFirstQuery(srq, 1);
>      // SpanNearQuery query = new SpanNearQuery(new SpanQuery[] {srq, stq},
> 6,
> @@ -84,7 +144,9 @@ public class TestSpanRegexQuery extends
>      directory.close();
>    }
> 
> -  public void testSpanRegexBug() throws CorruptIndexException, IOException {
> +  /** remove in lucene 4.0 */
> +  @Deprecated
> +  public void testSpanRegexBugOld() throws CorruptIndexException,
> IOException {
>      createRAMDirectories();
> 
>      SpanRegexQuery srq = new SpanRegexQuery(new Term("field", "a.*"));
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/SingleFieldTestDb.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/q
> ueryparser/src/test/org/apache/lucene/queryParser/surround/query/SingleFiel
> dTestDb.java?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/SingleFieldTestDb.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/SingleFieldTestDb.java Wed Nov 17
> 15:43:06 2010
> @@ -17,6 +17,8 @@ package org.apache.lucene.queryParser.su
>   * limitations under the License.
>   */
> 
> +import java.util.Random;
> +
>  import org.apache.lucene.store.Directory;
>  import org.apache.lucene.store.MockDirectoryWrapper;
>  import org.apache.lucene.store.RAMDirectory;
> @@ -32,9 +34,9 @@ public class SingleFieldTestDb {
>    private String[] docs;
>    private String fieldName;
> 
> -  public SingleFieldTestDb(String[] documents, String fName) {
> +  public SingleFieldTestDb(Random random, String[] documents, String fName)
> {
>      try {
> -      db = new MockDirectoryWrapper(new RAMDirectory());
> +      db = new MockDirectoryWrapper(random, new RAMDirectory());
>        docs = documents;
>        fieldName = fName;
>        IndexWriter writer = new IndexWriter(db, new IndexWriterConfig(
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/Test02Boolean.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/q
> ueryparser/src/test/org/apache/lucene/queryParser/surround/query/Test02Bo
> olean.java?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/Test02Boolean.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/Test02Boolean.java Wed Nov 17
> 15:43:06 2010
> @@ -39,7 +39,7 @@ public class Test02Boolean extends Lucen
>      "a c e a b c"
>    };
> 
> -  SingleFieldTestDb db1 = new SingleFieldTestDb(docs1, fieldName);
> +  SingleFieldTestDb db1 = new SingleFieldTestDb(random, docs1, fieldName);
> 
>    public void normalTest1(String query, int[] expdnrs) throws Exception {
>      BooleanQueryTst bqt = new BooleanQueryTst( query, expdnrs, db1,
> fieldName, this,
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/Test03Distance.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/q
> ueryparser/src/test/org/apache/lucene/queryParser/surround/query/Test03Dis
> tance.java?rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/Test03Distance.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/queryparser/src/test/org/apac
> he/lucene/queryParser/surround/query/Test03Distance.java Wed Nov 17
> 15:43:06 2010
> @@ -58,7 +58,7 @@ public class Test03Distance extends Luce
>      "a c e a b c"
>    };
> 
> -  SingleFieldTestDb db1 = new SingleFieldTestDb(docs1, fieldName);
> +  SingleFieldTestDb db1 = new SingleFieldTestDb(random, docs1, fieldName);
> 
>    private void distanceTst(String query, int[] expdnrs, SingleFieldTestDb db)
> throws Exception {
>      BooleanQueryTst bqt = new BooleanQueryTst( query, expdnrs, db,
> fieldName, this,
> @@ -179,7 +179,7 @@ public class Test03Distance extends Luce
>      ""
>    };
> 
> -  SingleFieldTestDb db2 = new SingleFieldTestDb(docs2, fieldName);
> +  SingleFieldTestDb db2 = new SingleFieldTestDb(random, docs2, fieldName);
> 
>    public void distanceTest2(String query, int[] expdnrs) throws Exception {
>      distanceTst(query, expdnrs, db2);
> @@ -227,7 +227,7 @@ public class Test03Distance extends Luce
>      ""
>    };
> 
> -  SingleFieldTestDb db3 = new SingleFieldTestDb(docs3, fieldName);
> +  SingleFieldTestDb db3 = new SingleFieldTestDb(random, docs3, fieldName);
> 
>    public void distanceTest3(String query, int[] expdnrs) throws Exception {
>      distanceTst(query, expdnrs, db3);
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/contrib/spellchecker/src/java/org/apac
> he/lucene/search/spell/DirectSpellChecker.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/s
> pellchecker/src/java/org/apache/lucene/search/spell/DirectSpellChecker.java?
> rev=1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/contrib/spellchecker/src/java/org/apac
> he/lucene/search/spell/DirectSpellChecker.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/contrib/spellchecker/src/java/org/apac
> he/lucene/search/spell/DirectSpellChecker.java Wed Nov 17 15:43:06 2010
> @@ -28,7 +28,8 @@ import java.util.PriorityQueue;
>  import org.apache.lucene.index.IndexReader;
>  import org.apache.lucene.index.Term;
>  import org.apache.lucene.search.FuzzyTermsEnum;
> -import org.apache.lucene.search.MultiTermQuery;
> +import org.apache.lucene.search.BoostAttribute;
> +import org.apache.lucene.search.MaxNonCompetitiveBoostAttribute;
>  import org.apache.lucene.util.ArrayUtil;
>  import org.apache.lucene.util.AttributeSource;
>  import org.apache.lucene.util.BytesRef;
> @@ -389,16 +390,16 @@ public class DirectSpellChecker {
>        IndexReader ir, int docfreq, int editDistance, float accuracy) throws
> IOException {
> 
>      AttributeSource atts = new AttributeSource();
> -    MultiTermQuery.MaxNonCompetitiveBoostAttribute maxBoostAtt =
> -
> atts.addAttribute(MultiTermQuery.MaxNonCompetitiveBoostAttribute.class);
> +    MaxNonCompetitiveBoostAttribute maxBoostAtt =
> +      atts.addAttribute(MaxNonCompetitiveBoostAttribute.class);
>      FuzzyTermsEnum e = new FuzzyTermsEnum(ir, atts, term, editDistance,
> Math.max(minPrefix, editDistance-1));
>      final PriorityQueue<ScoreTerm> stQueue = new
> PriorityQueue<ScoreTerm>();
> 
>      BytesRef queryTerm = new BytesRef(term.text());
>      BytesRef candidateTerm;
>      ScoreTerm st = new ScoreTerm();
> -    MultiTermQuery.BoostAttribute boostAtt =
> -      e.attributes().addAttribute(MultiTermQuery.BoostAttribute.class);
> +    BoostAttribute boostAtt =
> +      e.attributes().addAttribute(BoostAttribute.class);
>      while ((candidateTerm = e.next()) != null) {
>        final float boost = boostAtt.getBoost();
>        // ignore uncompetitive hits
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Inde
> xFileDeleter.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/IndexFileDeleter.java?rev=1036080&r1=1036079&r2
> =1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Inde
> xFileDeleter.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Inde
> xFileDeleter.java Wed Nov 17 15:43:06 2010
> @@ -602,13 +602,13 @@ final class IndexFileDeleter {
>        if (!initDone) {
>          initDone = true;
>        } else {
> -        assert count > 0: "RefCount is 0 pre-increment for file \"" + fileName +
> "\"";
> +        assert count > 0: Thread.currentThread().getName() + ": RefCount is 0
> pre-increment for file \"" + fileName + "\"";
>        }
>        return ++count;
>      }
> 
>      public int DecRef() {
> -      assert count > 0: "RefCount is 0 pre-decrement for file \"" + fileName +
> "\"";
> +      assert count > 0: Thread.currentThread().getName() + ": RefCount is 0 pre-
> decrement for file \"" + fileName + "\"";
>        return --count;
>      }
>    }
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Inde
> xWriter.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/IndexWriter.java?rev=1036080&r1=1036079&r2=103
> 6080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Inde
> xWriter.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Inde
> xWriter.java Wed Nov 17 15:43:06 2010
> @@ -286,6 +286,7 @@ public class IndexWriter implements Clos
>    private IndexFileDeleter deleter;
> 
>    private Set<SegmentInfo> segmentsToOptimize = new
> HashSet<SegmentInfo>();           // used by optimize to note those needing
> optimization
> +  private int optimizeMaxNumSegments;
> 
>    private Lock writeLock;
> 
> @@ -2379,6 +2380,7 @@ public class IndexWriter implements Clos
>      synchronized(this) {
>        resetMergeExceptions();
>        segmentsToOptimize = new HashSet<SegmentInfo>(segmentInfos);
> +      optimizeMaxNumSegments = maxNumSegments;
> 
>        // Now mark all pending & running merges as optimize
>        // merge:
> @@ -2579,8 +2581,9 @@ public class IndexWriter implements Clos
>      throws CorruptIndexException, IOException {
>      assert !optimize || maxNumSegmentsOptimize > 0;
> 
> -    if (stopMerges)
> +    if (stopMerges) {
>        return;
> +    }
> 
>      // Do not start new merges if we've hit OOME
>      if (hitOOM) {
> @@ -2594,19 +2597,21 @@ public class IndexWriter implements Clos
>        if (spec != null) {
>          final int numMerges = spec.merges.size();
>          for(int i=0;i<numMerges;i++) {
> -          final MergePolicy.OneMerge merge = ( spec.merges.get(i));
> +          final MergePolicy.OneMerge merge = spec.merges.get(i);
>            merge.optimize = true;
>            merge.maxNumSegmentsOptimize = maxNumSegmentsOptimize;
>          }
>        }
> 
> -    } else
> +    } else {
>        spec = mergePolicy.findMerges(segmentInfos);
> +    }
> 
>      if (spec != null) {
>        final int numMerges = spec.merges.size();
> -      for(int i=0;i<numMerges;i++)
> +      for(int i=0;i<numMerges;i++) {
>          registerMerge(spec.merges.get(i));
> +      }
>      }
>    }
> 
> @@ -3044,7 +3049,9 @@ public class IndexWriter implements Clos
>                checkpoint();
>              }
>            } finally {
> -            deleter.decRef(files);
> +            synchronized(this) {
> +              deleter.decRef(files);
> +            }
>            }
>          }
>        }
> @@ -3613,8 +3620,10 @@ public class IndexWriter implements Clos
>      // disk, updating SegmentInfo, etc.:
>      readerPool.clear(merge.segments);
> 
> -    if (merge.optimize)
> +    if (merge.optimize) {
> +      // cascade the optimize:
>        segmentsToOptimize.add(merge.info);
> +    }
>      return true;
>    }
> 
> @@ -3732,12 +3741,19 @@ public class IndexWriter implements Clos
>      boolean isExternal = false;
>      for(int i=0;i<count;i++) {
>        final SegmentInfo info = merge.segments.info(i);
> -      if (mergingSegments.contains(info))
> +      if (mergingSegments.contains(info)) {
>          return false;
> -      if (segmentInfos.indexOf(info) == -1)
> +      }
> +      if (segmentInfos.indexOf(info) == -1) {
>          return false;
> -      if (info.dir != directory)
> +      }
> +      if (info.dir != directory) {
>          isExternal = true;
> +      }
> +      if (segmentsToOptimize.contains(info)) {
> +        merge.optimize = true;
> +        merge.maxNumSegmentsOptimize = optimizeMaxNumSegments;
> +      }
>      }
> 
>      ensureContiguousMerge(merge);
> @@ -4239,7 +4255,9 @@ public class IndexWriter implements Clos
>        if (merge.isAborted()) {
>          if (infoStream != null)
>            message("abort merge after building CFS");
> -        deleter.deleteFile(compoundFileName);
> +        synchronized(this) {
> +          deleter.deleteFile(compoundFileName);
> +        }
>          return 0;
>        }
> 
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Per
> FieldCodecWrapper.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/PerFieldCodecWrapper.java?rev=1036080&r1=10360
> 79&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Per
> FieldCodecWrapper.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Per
> FieldCodecWrapper.java Wed Nov 17 15:43:06 2010
> @@ -63,9 +63,7 @@ final class PerFieldCodecWrapper extends
>        assert segmentCodecs == state.segmentCodecs;
>        final Codec[] codecs = segmentCodecs.codecs;
>        for (int i = 0; i < codecs.length; i++) {
> -        state.currentCodecId = i; // actual codec should use that to create its
> -                                  // files
> -        consumers.add(codecs[i].fieldsConsumer(state));
> +        consumers.add(codecs[i].fieldsConsumer(new SegmentWriteState(state,
> "" + i)));
>        }
>      }
> 
> @@ -119,7 +117,7 @@ final class PerFieldCodecWrapper extends
>            Codec codec = segmentCodecs.codecs[fi.codecId];
>            if (!producers.containsKey(codec)) {
>              producers.put(codec, codec.fieldsProducer(new SegmentReadState(dir,
> -                si, fieldInfos, readBufferSize, indexDivisor)));
> +                si, fieldInfos, readBufferSize, indexDivisor, ""+fi.codecId)));
>            }
>            codecs.put(fi.name, producers.get(codec));
>          }
> @@ -215,8 +213,9 @@ final class PerFieldCodecWrapper extends
>    }
> 
>    @Override
> -  public void files(Directory dir, SegmentInfo info, Set<String> files)
> +  public void files(Directory dir, SegmentInfo info, String codecId, Set<String>
> files)
>        throws IOException {
> +    // ignore codecid sicne segmentCodec will assign it per codec
>      segmentCodecs.files(dir, info, files);
>    }
> 
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentCodecs.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/SegmentCodecs.java?rev=1036080&r1=1036079&r2=
> 1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentCodecs.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentCodecs.java Wed Nov 17 15:43:06 2010
> @@ -18,7 +18,6 @@ package org.apache.lucene.index;
>   */
>  import java.io.IOException;
>  import java.util.ArrayList;
> -import java.util.HashSet;
>  import java.util.IdentityHashMap;
>  import java.util.Map;
>  import java.util.Set;
> @@ -120,14 +119,11 @@ final class SegmentCodecs implements Clo
> 
>    void files(Directory dir, SegmentInfo info, Set<String> files)
>        throws IOException {
> -    final Set<Codec> seen = new HashSet<Codec>();
>      final Codec[] codecArray = codecs;
> -    for (Codec codec : codecArray) {
> -      if (!seen.contains(codec)) {
> -        seen.add(codec);
> -        codec.files(dir, info, files);
> -      }
> -    }
> +    for (int i = 0; i < codecArray.length; i++) {
> +      codecArray[i].files(dir, info, ""+i, files);
> +    }
> +
>    }
> 
>    @Override
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentReadState.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/SegmentReadState.java?rev=1036080&r1=1036079&
> r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentReadState.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentReadState.java Wed Nov 17 15:43:06 2010
> @@ -34,16 +34,24 @@ public class SegmentReadState {
>    // that must do so), then it should negate this value to
>    // get the app's terms divisor:
>    public final int termsIndexDivisor;
> +  public final String codecId;
> 
> +  public SegmentReadState(Directory dir, SegmentInfo info,
> +      FieldInfos fieldInfos, int readBufferSize, int termsIndexDivisor) {
> +    this(dir, info, fieldInfos, readBufferSize, termsIndexDivisor, "");
> +  }
> +
>    public SegmentReadState(Directory dir,
>                            SegmentInfo info,
>                            FieldInfos fieldInfos,
>                            int readBufferSize,
> -                          int termsIndexDivisor) {
> +                          int termsIndexDivisor,
> +                          String codecId) {
>      this.dir = dir;
>      this.segmentInfo = info;
>      this.fieldInfos = fieldInfos;
>      this.readBufferSize = readBufferSize;
>      this.termsIndexDivisor = termsIndexDivisor;
> +    this.codecId = codecId;
>    }
>  }
> \ No newline at end of file
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentWriteState.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/SegmentWriteState.java?rev=1036080&r1=1036079
> &r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentWriteState.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/Seg
> mentWriteState.java Wed Nov 17 15:43:06 2010
> @@ -37,7 +37,7 @@ public class SegmentWriteState {
>    public final Collection<String> flushedFiles;
> 
>    final SegmentCodecs segmentCodecs;
> -  public int currentCodecId;
> +  public final String codecId;
> 
>    /** Expert: The fraction of terms in the "dictionary" which should be stored
>     * in RAM.  Smaller values use more memory, but make searching slightly
> @@ -73,5 +73,23 @@ public class SegmentWriteState {
>      this.termIndexInterval = termIndexInterval;
>      this.segmentCodecs = segmentCodecs;
>      flushedFiles = new HashSet<String>();
> +    codecId = "";
> +  }
> +
> +  /**
> +   * Create a shallow {@link SegmentWriteState} copy final a codec ID
> +   */
> +  SegmentWriteState(SegmentWriteState state, String codecId) {
> +    infoStream = state.infoStream;
> +    directory = state.directory;
> +    segmentName = state.segmentName;
> +    fieldInfos = state.fieldInfos;
> +    docStoreSegmentName = state.docStoreSegmentName;
> +    numDocs = state.numDocs;
> +    numDocsInStore = state.numDocsInStore;
> +    termIndexInterval = state.termIndexInterval;
> +    segmentCodecs = state.segmentCodecs;
> +    flushedFiles = state.flushedFiles;
> +    this.codecId = codecId;
>    }
>  }
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/Codec.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/Codec.java?rev=1036080&r1=1036079&r2=1
> 036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/Codec.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/Codec.java Wed Nov 17 15:43:06 2010
> @@ -51,8 +51,15 @@ public abstract class Codec {
>     *  use; else, those files may be deleted. */
>    public abstract FieldsProducer fieldsProducer(SegmentReadState state)
> throws IOException;
> 
> -  /** Gathers files associated with this segment */
> -  public abstract void files(Directory dir, SegmentInfo segmentInfo, Set<String>
> files) throws IOException;
> +  /**
> +   * Gathers files associated with this segment
> +   *
> +   * @param dir the {@link Directory} this segment was written to
> +   * @param segmentInfo the {@link SegmentInfo} for this segment
> +   * @param id the codec id within this segment
> +   * @param files the of files to add the codec files to.
> +   */
> +  public abstract void files(Directory dir, SegmentInfo segmentInfo, String id,
> Set<String> files) throws IOException;
> 
>    /** Records all file extensions this codec uses */
>    public abstract void getExtensions(Set<String> extensions);
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/FixedGapTermsIndexReader.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/FixedGapTermsIndexReader.java?rev=103608
> 0&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/FixedGapTermsIndexReader.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/FixedGapTermsIndexReader.java Wed Nov 17 15:43:06 2010
> @@ -90,12 +90,12 @@ public class FixedGapTermsIndexReader ex
>    // start of the field info data
>    protected long dirOffset;
> 
> -  public FixedGapTermsIndexReader(Directory dir, FieldInfos fieldInfos, String
> segment, int indexDivisor, Comparator<BytesRef> termComp)
> +  public FixedGapTermsIndexReader(Directory dir, FieldInfos fieldInfos, String
> segment, int indexDivisor, Comparator<BytesRef> termComp, String codecId)
>      throws IOException {
> 
>      this.termComp = termComp;
> 
> -    IndexInput in = dir.openInput(IndexFileNames.segmentFileName(segment,
> "", FixedGapTermsIndexWriter.TERMS_INDEX_EXTENSION));
> +    IndexInput in = dir.openInput(IndexFileNames.segmentFileName(segment,
> codecId, FixedGapTermsIndexWriter.TERMS_INDEX_EXTENSION));
> 
>      boolean success = false;
> 
> @@ -436,8 +436,8 @@ public class FixedGapTermsIndexReader ex
>      return fields.get(fieldInfo);
>    }
> 
> -  public static void files(Directory dir, SegmentInfo info, Collection<String>
> files) {
> -    files.add(IndexFileNames.segmentFileName(info.name, "",
> FixedGapTermsIndexWriter.TERMS_INDEX_EXTENSION));
> +  public static void files(Directory dir, SegmentInfo info, String id,
> Collection<String> files) {
> +    files.add(IndexFileNames.segmentFileName(info.name, id,
> FixedGapTermsIndexWriter.TERMS_INDEX_EXTENSION));
>    }
> 
>    public static void getIndexExtensions(Collection<String> extensions) {
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/FixedGapTermsIndexWriter.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/FixedGapTermsIndexWriter.java?rev=103608
> 0&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/FixedGapTermsIndexWriter.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/FixedGapTermsIndexWriter.java Wed Nov 17 15:43:06 2010
> @@ -49,7 +49,7 @@ public class FixedGapTermsIndexWriter ex
>    private IndexOutput termsOut;
> 
>    public FixedGapTermsIndexWriter(SegmentWriteState state) throws
> IOException {
> -    final String indexFileName =
> IndexFileNames.segmentFileName(state.segmentName, "",
> TERMS_INDEX_EXTENSION);
> +    final String indexFileName =
> IndexFileNames.segmentFileName(state.segmentName, state.codecId,
> TERMS_INDEX_EXTENSION);
>      state.flushedFiles.add(indexFileName);
>      termIndexInterval = state.termIndexInterval;
>      out = state.directory.createOutput(indexFileName);
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/PrefixCodedTermsReader.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/PrefixCodedTermsReader.java?rev=1036080
> &r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/PrefixCodedTermsReader.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/PrefixCodedTermsReader.java Wed Nov 17 15:43:06 2010
> @@ -113,7 +113,7 @@ public class PrefixCodedTermsReader exte
>    }
> 
>    public PrefixCodedTermsReader(TermsIndexReaderBase indexReader,
> Directory dir, FieldInfos fieldInfos, String segment, PostingsReaderBase
> postingsReader, int readBufferSize,
> -                                 Comparator<BytesRef> termComp, int termsCacheSize)
> +                                 Comparator<BytesRef> termComp, int termsCacheSize,
> String codecId)
>      throws IOException {
> 
>      this.postingsReader = postingsReader;
> @@ -121,7 +121,7 @@ public class PrefixCodedTermsReader exte
> 
>      this.termComp = termComp;
> 
> -    in = dir.openInput(IndexFileNames.segmentFileName(segment, "",
> PrefixCodedTermsWriter.TERMS_EXTENSION),
> +    in = dir.openInput(IndexFileNames.segmentFileName(segment, codecId,
> PrefixCodedTermsWriter.TERMS_EXTENSION),
>                         readBufferSize);
> 
>      boolean success = false;
> @@ -204,8 +204,8 @@ public class PrefixCodedTermsReader exte
>      }
>    }
> 
> -  public static void files(Directory dir, SegmentInfo segmentInfo,
> Collection<String> files) {
> -    files.add(IndexFileNames.segmentFileName(segmentInfo.name, "",
> PrefixCodedTermsWriter.TERMS_EXTENSION));
> +  public static void files(Directory dir, SegmentInfo segmentInfo, String id,
> Collection<String> files) {
> +    files.add(IndexFileNames.segmentFileName(segmentInfo.name, id,
> PrefixCodedTermsWriter.TERMS_EXTENSION));
>    }
> 
>    public static void getExtensions(Collection<String> extensions) {
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/PrefixCodedTermsWriter.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/PrefixCodedTermsWriter.java?rev=1036080&
> r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/PrefixCodedTermsWriter.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/PrefixCodedTermsWriter.java Wed Nov 17 15:43:06 2010
> @@ -69,7 +69,7 @@ public class PrefixCodedTermsWriter exte
>        PostingsWriterBase postingsWriter,
>        Comparator<BytesRef> termComp) throws IOException
>    {
> -    final String termsFileName =
> IndexFileNames.segmentFileName(state.segmentName, "",
> TERMS_EXTENSION);
> +    final String termsFileName =
> IndexFileNames.segmentFileName(state.segmentName, state.codecId,
> TERMS_EXTENSION);
>      this.termsIndexWriter = termsIndexWriter;
>      this.termComp = termComp;
>      out = state.directory.createOutput(termsFileName);
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesCodec.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/docvalues/DocValuesCodec.java?rev=103608
> 0&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesCodec.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesCodec.java Wed Nov 17 15:43:06 2010
> @@ -27,7 +27,6 @@ import java.util.Set;
>  import java.util.Map.Entry;
> 
>  import org.apache.lucene.index.FieldInfo;
> -import org.apache.lucene.index.FieldInfos;
>  import org.apache.lucene.index.FieldsEnum;
>  import org.apache.lucene.index.SegmentInfo;
>  import org.apache.lucene.index.SegmentReadState;
> @@ -92,7 +91,9 @@ public class DocValuesCodec extends Code
>      public synchronized DocValuesConsumer addValuesField(FieldInfo field)
>          throws IOException {
>        DocValuesConsumer consumer =
> DocValuesConsumer.create(state.segmentName,
> -          state.directory, field, null); // TODO: set comparator here
> +      // TODO: set comparator here
> +      //TODO can we have a compound file per segment and codec for
> docvalues?
> +          state.directory, field, state.codecId +"-"+ field.number, null);
>        docValuesConsumers.add(consumer);
>        return consumer;
>      }
> @@ -113,30 +114,30 @@ public class DocValuesCodec extends Code
>      Directory dir = state.dir;
>      Set<String> files = new HashSet<String>();
> 
> -    other.files(dir, state.segmentInfo, files);
> +    other.files(dir, state.segmentInfo, state.codecId, files);
>      for (String string : files) {
>        if (dir.fileExists(string))
> -        return new WrappingFielsdProducer(state.segmentInfo, state.dir,
> -            state.fieldInfos, other.fieldsProducer(state));
> +        return new WrappingFielsdProducer(state, other.fieldsProducer(state));
>      }
> -    return new WrappingFielsdProducer(state.segmentInfo, state.dir,
> -        state.fieldInfos, FieldsProducer.EMPTY);
> +    return new WrappingFielsdProducer(state, FieldsProducer.EMPTY);
> 
>    }
> 
>    @Override
> -  public void files(Directory dir, SegmentInfo segmentInfo, Set<String> files)
> -      throws IOException {
> +  public void files(Directory dir, SegmentInfo segmentInfo, String codecId,
> +      Set<String> files) throws IOException {
>      Set<String> otherFiles = new HashSet<String>();
> -    other.files(dir, segmentInfo, otherFiles);
> -    for (String string : otherFiles) { // under some circumstances we only write
> DocValues
> -                                       // so other files will be added even if they don't exist
> +    other.files(dir, segmentInfo, codecId, otherFiles);
> +    for (String string : otherFiles) { // under some circumstances we only write
> +                                       // DocValues
> +                                       // so other files will be added even if
> +                                       // they don't exist
>        if (dir.fileExists(string))
>          files.add(string);
>      }
> -
> +    //TODO can we have a compound file per segment and codec for
> docvalues?
>      for (String file : dir.listAll()) {
> -      if (file.startsWith(segmentInfo.name)
> +      if (file.startsWith(segmentInfo.name+"_" + codecId)
>            && (file.endsWith(Writer.DATA_EXTENSION) || file
>                .endsWith(Writer.INDEX_EXTENSION))) {
>          files.add(file);
> @@ -156,9 +157,9 @@ public class DocValuesCodec extends Code
> 
>      private final FieldsProducer other;
> 
> -    WrappingFielsdProducer(SegmentInfo si, Directory dir, FieldInfos fieldInfo,
> -        FieldsProducer other) throws IOException {
> -      super(si, dir, fieldInfo);
> +    WrappingFielsdProducer(SegmentReadState state, FieldsProducer other)
> +        throws IOException {
> +      super(state.segmentInfo, state.dir, state.fieldInfos, state.codecId);
>        this.other = other;
>      }
> 
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesConsumer.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/docvalues/DocValuesConsumer.java?rev=103
> 6080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesConsumer.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesConsumer.java Wed Nov 17 15:43:06 2010
> @@ -89,9 +89,9 @@ public abstract class DocValuesConsumer
>    }
> 
>    public static DocValuesConsumer create(String segmentName,
> -      Directory directory, FieldInfo field, Comparator<BytesRef> comp)
> +      Directory directory, FieldInfo field, String codecId, Comparator<BytesRef>
> comp)
>        throws IOException {
> -    final String id = segmentName + "_" + field.number;
> +    final String id = segmentName + "_" + codecId;
>      return Writer.create(field.getDocValues(), id, directory, comp);
>    }
>  }
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesProducerBase.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/docvalues/DocValuesProducerBase.java?rev=
> 1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesProducerBase.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/docvalues/DocValuesProducerBase.java Wed Nov 17 15:43:06 2010
> @@ -36,8 +36,8 @@ public abstract class DocValuesProducerB
> 
>    protected final TreeMap<String, DocValues> docValues = new
> TreeMap<String, DocValues>();
> 
> -  protected DocValuesProducerBase(SegmentInfo si, Directory dir, FieldInfos
> fieldInfo) throws IOException {
> -    load(fieldInfo, si.name, si.docCount, dir);
> +  protected DocValuesProducerBase(SegmentInfo si, Directory dir, FieldInfos
> fieldInfo, String codecId) throws IOException {
> +    load(fieldInfo, si.name, si.docCount, dir, codecId);
>    }
> 
>    @Override
> @@ -47,14 +47,14 @@ public abstract class DocValuesProducerB
> 
>    // Only opens files... doesn't actually load any values
>    protected void load(FieldInfos fieldInfos, String segment, int docCount,
> -      Directory dir) throws IOException {
> +      Directory dir, String codecId) throws IOException {
>      final int numFields = fieldInfos.size();
>      for (int i = 0; i < numFields; i++) {
>        final FieldInfo fieldInfo = fieldInfos.fieldInfo(i);
>        final Values v = fieldInfo.getDocValues();
>        final String field = fieldInfo.name;
> -      final String id = IndexFileNames.segmentFileName(segment, Integer
> -          .toString(fieldInfo.number),"");
> +      //TODO can we have a compound file  per segment and codec for
> docvalues?
> +      final String id = IndexFileNames.segmentFileName(segment, codecId+"-
> "+fieldInfo.number, "");
>        if (v != null && dir.fileExists(id + "." +  Writer.DATA_EXTENSION)) {
>          docValues.put(field, loadDocValues(docCount, dir, id, v));
>        }
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/preflex/PreFlexCodec.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/preflex/PreFlexCodec.java?rev=1036080&r1=
> 1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/preflex/PreFlexCodec.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/preflex/PreFlexCodec.java Wed Nov 17 15:43:06 2010
> @@ -66,7 +66,8 @@ public class PreFlexCodec extends Codec
>    }
> 
>    @Override
> -  public void files(Directory dir, SegmentInfo info, Set<String> files) throws
> IOException {
> +  public void files(Directory dir, SegmentInfo info, String id, Set<String> files)
> throws IOException {
> +    // preflex fields have no codec ID - we ignore it here
>      PreFlexFields.files(dir, info, files);
>    }
> 
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/pulsing/PulsingCodec.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/pulsing/PulsingCodec.java?rev=1036080&r1=
> 1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/pulsing/PulsingCodec.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/pulsing/PulsingCodec.java Wed Nov 17 15:43:06 2010
> @@ -108,7 +108,7 @@ public class PulsingCodec extends Codec
> 
>      // We wrap StandardPostingsReader, but any StandardPostingsReader
>      // will work:
> -    PostingsReaderBase docsReader = new StandardPostingsReader(state.dir,
> state.segmentInfo, state.readBufferSize);
> +    PostingsReaderBase docsReader = new StandardPostingsReader(state.dir,
> state.segmentInfo, state.readBufferSize, state.codecId);
>      PostingsReaderBase pulsingReader = new
> PulsingPostingsReaderImpl(docsReader);
> 
>      // Terms dict index reader
> @@ -120,7 +120,8 @@ public class PulsingCodec extends Codec
>                                                         state.fieldInfos,
>                                                         state.segmentInfo.name,
>                                                         state.termsIndexDivisor,
> -
> BytesRef.getUTF8SortedAsUnicodeComparator());
> +
> BytesRef.getUTF8SortedAsUnicodeComparator(),
> +                                                       state.codecId);
>        success = true;
>      } finally {
>        if (!success) {
> @@ -136,7 +137,8 @@ public class PulsingCodec extends Codec
>                                                         pulsingReader,
>                                                         state.readBufferSize,
> 
> BytesRef.getUTF8SortedAsUnicodeComparator(),
> -                                                       StandardCodec.TERMS_CACHE_SIZE);
> +                                                       StandardCodec.TERMS_CACHE_SIZE,
> +                                                       state.codecId);
>        success = true;
>        return ret;
>      } finally {
> @@ -151,10 +153,10 @@ public class PulsingCodec extends Codec
>    }
> 
>    @Override
> -  public void files(Directory dir, SegmentInfo segmentInfo, Set<String> files)
> throws IOException {
> -    StandardPostingsReader.files(dir, segmentInfo, files);
> -    PrefixCodedTermsReader.files(dir, segmentInfo, files);
> -    FixedGapTermsIndexReader.files(dir, segmentInfo, files);
> +  public void files(Directory dir, SegmentInfo segmentInfo, String id,
> Set<String> files) throws IOException {
> +    StandardPostingsReader.files(dir, segmentInfo, id, files);
> +    PrefixCodedTermsReader.files(dir, segmentInfo, id, files);
> +    FixedGapTermsIndexReader.files(dir, segmentInfo, id, files);
>    }
> 
>    @Override
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/sep/SepPostingsReaderImpl.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java?rev=103608
> 0&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/sep/SepPostingsReaderImpl.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/sep/SepPostingsReaderImpl.java Wed Nov 17 15:43:06 2010
> @@ -54,20 +54,20 @@ public class SepPostingsReaderImpl exten
>    int skipInterval;
>    int maxSkipLevels;
> 
> -  public SepPostingsReaderImpl(Directory dir, SegmentInfo segmentInfo, int
> readBufferSize, IntStreamFactory intFactory) throws IOException {
> +  public SepPostingsReaderImpl(Directory dir, SegmentInfo segmentInfo, int
> readBufferSize, IntStreamFactory intFactory, String codecId) throws
> IOException {
> 
>      boolean success = false;
>      try {
> 
> -      final String docFileName =
> IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.DOC_EXTENSION);
> +      final String docFileName =
> IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.DOC_EXTENSION);
>        docIn = intFactory.openInput(dir, docFileName);
> 
> -      skipIn =
> dir.openInput(IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.SKIP_EXTENSION), readBufferSize);
> +      skipIn =
> dir.openInput(IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.SKIP_EXTENSION), readBufferSize);
> 
>        if (segmentInfo.getHasProx()) {
> -        freqIn = intFactory.openInput(dir,
> IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.FREQ_EXTENSION));
> -        posIn = intFactory.openInput(dir,
> IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.POS_EXTENSION), readBufferSize);
> -        payloadIn =
> dir.openInput(IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.PAYLOAD_EXTENSION), readBufferSize);
> +        freqIn = intFactory.openInput(dir,
> IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.FREQ_EXTENSION));
> +        posIn = intFactory.openInput(dir,
> IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.POS_EXTENSION), readBufferSize);
> +        payloadIn =
> dir.openInput(IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.PAYLOAD_EXTENSION), readBufferSize);
>        } else {
>          posIn = null;
>          payloadIn = null;
> @@ -81,14 +81,14 @@ public class SepPostingsReaderImpl exten
>      }
>    }
> 
> -  public static void files(SegmentInfo segmentInfo, Collection<String> files) {
> -    files.add(IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.DOC_EXTENSION));
> -    files.add(IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.SKIP_EXTENSION));
> +  public static void files(SegmentInfo segmentInfo, String codecId,
> Collection<String> files) {
> +    files.add(IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.DOC_EXTENSION));
> +    files.add(IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.SKIP_EXTENSION));
> 
>      if (segmentInfo.getHasProx()) {
> -      files.add(IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.FREQ_EXTENSION));
> -      files.add(IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.POS_EXTENSION));
> -      files.add(IndexFileNames.segmentFileName(segmentInfo.name, "",
> SepPostingsWriterImpl.PAYLOAD_EXTENSION));
> +      files.add(IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.FREQ_EXTENSION));
> +      files.add(IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.POS_EXTENSION));
> +      files.add(IndexFileNames.segmentFileName(segmentInfo.name, codecId,
> SepPostingsWriterImpl.PAYLOAD_EXTENSION));
>      }
>    }
> 
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/sep/SepPostingsWriterImpl.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java?rev=103608
> 0&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/sep/SepPostingsWriterImpl.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/sep/SepPostingsWriterImpl.java Wed Nov 17 15:43:06 2010
> @@ -84,24 +84,24 @@ public final class SepPostingsWriterImpl
>    public SepPostingsWriterImpl(SegmentWriteState state, IntStreamFactory
> factory) throws IOException {
>      super();
> 
> -    final String docFileName =
> IndexFileNames.segmentFileName(state.segmentName, "", DOC_EXTENSION);
> +    final String docFileName =
> IndexFileNames.segmentFileName(state.segmentName, state.codecId,
> DOC_EXTENSION);
>      state.flushedFiles.add(docFileName);
>      docOut = factory.createOutput(state.directory, docFileName);
>      docIndex = docOut.index();
> 
>      if (state.fieldInfos.hasProx()) {
> -      final String frqFileName =
> IndexFileNames.segmentFileName(state.segmentName, "", FREQ_EXTENSION);
> +      final String frqFileName =
> IndexFileNames.segmentFileName(state.segmentName, state.codecId,
> FREQ_EXTENSION);
>        state.flushedFiles.add(frqFileName);
>        freqOut = factory.createOutput(state.directory, frqFileName);
>        freqIndex = freqOut.index();
> 
> -      final String posFileName =
> IndexFileNames.segmentFileName(state.segmentName, "", POS_EXTENSION);
> +      final String posFileName =
> IndexFileNames.segmentFileName(state.segmentName, state.codecId,
> POS_EXTENSION);
>        posOut = factory.createOutput(state.directory, posFileName);
>        state.flushedFiles.add(posFileName);
>        posIndex = posOut.index();
> 
>        // TODO: -- only if at least one field stores payloads?
> -      final String payloadFileName =
> IndexFileNames.segmentFileName(state.segmentName, "",
> PAYLOAD_EXTENSION);
> +      final String payloadFileName =
> IndexFileNames.segmentFileName(state.segmentName, state.codecId,
> PAYLOAD_EXTENSION);
>        state.flushedFiles.add(payloadFileName);
>        payloadOut = state.directory.createOutput(payloadFileName);
> 
> @@ -113,7 +113,7 @@ public final class SepPostingsWriterImpl
>        payloadOut = null;
>      }
> 
> -    final String skipFileName =
> IndexFileNames.segmentFileName(state.segmentName, "", SKIP_EXTENSION);
> +    final String skipFileName =
> IndexFileNames.segmentFileName(state.segmentName, state.codecId,
> SKIP_EXTENSION);
>      state.flushedFiles.add(skipFileName);
>      skipOut = state.directory.createOutput(skipFileName);
> 
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextCodec.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/simpletext/SimpleTextCodec.java?rev=10360
> 80&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextCodec.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextCodec.java Wed Nov 17 15:43:06 2010
> @@ -56,13 +56,13 @@ public class SimpleTextCodec extends Cod
>    /** Extension of freq postings file */
>    static final String POSTINGS_EXTENSION = "pst";
> 
> -  static String getPostingsFileName(String segment) {
> +  static String getPostingsFileName(String segment, String id) {
>      return IndexFileNames.segmentFileName(segment, "",
> POSTINGS_EXTENSION);
>    }
> 
>    @Override
> -  public void files(Directory dir, SegmentInfo segmentInfo, Set<String> files)
> throws IOException {
> -    files.add(getPostingsFileName(segmentInfo.name));
> +  public void files(Directory dir, SegmentInfo segmentInfo, String id,
> Set<String> files) throws IOException {
> +    files.add(getPostingsFileName(segmentInfo.name, id));
>    }
> 
>    @Override
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextFieldsReader.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsReader.java?rev=
> 1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextFieldsReader.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextFieldsReader.java Wed Nov 17 15:43:06 2010
> @@ -57,7 +57,8 @@ class SimpleTextFieldsReader extends Fie
>    final static BytesRef PAYLOAD = SimpleTextFieldsWriter.PAYLOAD;
> 
>    public SimpleTextFieldsReader(SegmentReadState state) throws IOException {
> -    in =
> state.dir.openInput(SimpleTextCodec.getPostingsFileName(state.segmentInfo.n
> ame));
> +    in =
> state.dir.openInput(SimpleTextCodec.getPostingsFileName(state.segmentInfo.n
> ame, ""+state.codecId));
> +
>      fieldInfos = state.fieldInfos;
>    }
> 
> 
> Modified:
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextFieldsWriter.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/
> org/apache/lucene/index/codecs/simpletext/SimpleTextFieldsWriter.java?rev=
> 1036080&r1=1036079&r2=1036080&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextFieldsWriter.java (original)
> +++
> lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/cod
> ecs/simpletext/SimpleTextFieldsWriter.java Wed Nov 17 15:43:06 2010
> @@ -44,7 +44,7 @@ class SimpleTextFieldsWriter extends Fie
>    final static BytesRef PAYLOAD = new BytesRef("        payload ");
> 
>    public SimpleTextFieldsWriter(SegmentWriteState state) throws IOException {
> -    final String fileName =
> SimpleTextCodec.getPostingsFileName(state.segmentName);
> +    final String fileName =
> SimpleTextCodec.getPostingsFileName(state.segmentName, state.codecId);
>      out = state.directory.createOutput(fileName);
>      state.flushedFiles.add(fileName);
>    }
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message