lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1629499 [1/7] - in /lucene/dev/trunk: ./ dev-tools/ lucene/ lucene/backward-codecs/ lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/ lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/ lucene/backward-codec...
Date Sun, 05 Oct 2014 14:01:17 GMT
Author: rmuir
Date: Sun Oct  5 14:01:13 2014
New Revision: 1629499

URL: http://svn.apache.org/r1629499
Log:
LUCENE-5969: Lucene 5.0 codec, round two

Added:
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40CompoundFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40CompoundFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40CompoundReader.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40CompoundReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40CompoundWriter.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40CompoundWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsIndexReader.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsIndexReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsReader.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42TermVectorsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42TermVectorsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42TermVectorsReader.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42TermVectorsReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49NormsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49NormsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49NormsProducer.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49NormsProducer.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40CompoundFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40CompoundFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41RWStoredFieldsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41RWStoredFieldsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsIndexWriter.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsIndexWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsWriter.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWTermVectorsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWTermVectorsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42TermVectorsWriter.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42TermVectorsWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/TestLucene42TermVectorsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/TestLucene42TermVectorsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49NormsConsumer.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49NormsConsumer.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWNormsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWNormsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/TestLucene49NormsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/TestLucene49NormsFormat.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextCompoundFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextCompoundFormat.java
    lucene/dev/trunk/lucene/codecs/src/test/org/apache/lucene/codecs/simpletext/TestSimpleTextCompoundFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/codecs/src/test/org/apache/lucene/codecs/simpletext/TestSimpleTextCompoundFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/CompoundFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/CompoundFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50CompoundFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50CompoundFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50CompoundReader.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50CompoundReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50NormsConsumer.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50NormsConsumer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50NormsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50NormsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50NormsProducer.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50NormsProducer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50StoredFieldsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50StoredFieldsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50TermVectorsFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50TermVectorsFormat.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene50/
      - copied from r1629408, lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/codecs/lucene50/
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/cranky/CrankyCompoundFormat.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/test-framework/src/java/org/apache/lucene/codecs/cranky/CrankyCompoundFormat.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/index/BaseCompoundFormatTestCase.java
      - copied unchanged from r1629408, lucene/dev/branches/lucene5969/lucene/test-framework/src/java/org/apache/lucene/index/BaseCompoundFormatTestCase.java
Removed:
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene42/
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene49/
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/CompoundFileDirectory.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/CompoundFileWriter.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41PostingsFormat.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene49/
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCompoundFile.java
    lucene/dev/trunk/lucene/misc/src/java/org/apache/lucene/index/CompoundFileExtractor.java
Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/dev-tools/   (props changed)
    lucene/dev/trunk/lucene/   (props changed)
    lucene/dev/trunk/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/trunk/lucene/backward-codecs/   (props changed)
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/BitVector.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40LiveDocsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene410/Lucene410Codec.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42Codec.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsProducer.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45Codec.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesConsumer.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46Codec.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46FieldInfosFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46FieldInfosReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46FieldInfosWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoReader.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49Codec.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesConsumer.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesProducer.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40DocValuesWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40PostingsWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWCodec.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWDocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWNormsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWPostingsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWSegmentInfoFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWStoredFieldsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWTermVectorsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestBitVector.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41RWCodec.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42NormsConsumer.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWCodec.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWDocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWNormsFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/Lucene45RWCodec.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/Lucene45RWDocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/TestLucene45DocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene46/Lucene46RWCodec.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene46/Lucene46RWSegmentInfoFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWCodec.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWDocValuesFormat.java
    lucene/dev/trunk/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/TestLucene49DocValuesFormat.java
    lucene/dev/trunk/lucene/codecs/   (props changed)
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsWriter.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/FixedGapTermsIndexReader.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/FixedGapTermsIndexWriter.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/VariableGapTermsIndexReader.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/VariableGapTermsIndexWriter.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blocktreeords/Ords41PostingsFormat.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blocktreeords/OrdsBlockTreeTermsReader.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blocktreeords/OrdsBlockTreeTermsWriter.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/blocktreeords/OrdsSegmentTermsEnum.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/bloom/BloomFilteringPostingsFormat.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesConsumer.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesProducer.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTOrdTermsReader.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTOrdTermsWriter.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsReader.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsWriter.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/MemoryDocValuesConsumer.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/MemoryDocValuesProducer.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/memory/MemoryPostingsFormat.java
    lucene/dev/trunk/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextCodec.java
    lucene/dev/trunk/lucene/core/   (props changed)
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/Codec.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/CodecUtil.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/DocValuesConsumer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/DocValuesProducer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/FieldsConsumer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/FieldsProducer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/FilterCodec.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/NormsConsumer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/NormsProducer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/StoredFieldsReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/StoredFieldsWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/TermVectorsReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/TermVectorsWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/MatchingReaders.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene410/Lucene410DocValuesProducer.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50Codec.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50FieldInfosFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50FieldInfosReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50FieldInfosWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50LiveDocsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/package.html
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldDocValuesFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/LiveIndexWriterConfig.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/MergeState.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/NumericDocValues.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentCoreReaders.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentMerger.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/Directory.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestBlockPostingsFormat.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestAllFilesHaveChecksumFooter.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestAllFilesHaveCodecHeader.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCodecUtil.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestConsistentFieldNumbers.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestDoc.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestSegmentMerger.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestTermVectorsReader.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java
    lucene/dev/trunk/lucene/demo/   (props changed)
    lucene/dev/trunk/lucene/memory/   (props changed)
    lucene/dev/trunk/lucene/misc/   (props changed)
    lucene/dev/trunk/lucene/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java
    lucene/dev/trunk/lucene/queries/   (props changed)
    lucene/dev/trunk/lucene/queryparser/   (props changed)
    lucene/dev/trunk/lucene/replicator/   (props changed)
    lucene/dev/trunk/lucene/sandbox/   (props changed)
    lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/IDVersionPostingsFormat.java
    lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/IDVersionPostingsReader.java
    lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/IDVersionPostingsWriter.java
    lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/IDVersionSegmentTermsEnum.java
    lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/VersionBlockTreeTermsReader.java
    lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/codecs/idversion/VersionBlockTreeTermsWriter.java
    lucene/dev/trunk/lucene/test-framework/   (props changed)
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/asserting/AssertingDocValuesFormat.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/asserting/AssertingNormsFormat.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/asserting/AssertingPostingsFormat.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/asserting/AssertingStoredFieldsFormat.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/asserting/AssertingTermVectorsFormat.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/cranky/CrankyCodec.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41ords/Lucene41WithOrds.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41vargap/Lucene41VarGapDocFreqInterval.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41vargap/Lucene41VarGapFixedInterval.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/mockrandom/MockRandomPostingsFormat.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/store/BaseDirectoryTestCase.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
    lucene/dev/trunk/solr/   (props changed)
    lucene/dev/trunk/solr/CHANGES.txt   (props changed)
    lucene/dev/trunk/solr/core/   (props changed)
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java
    lucene/dev/trunk/solr/solrj/   (props changed)
    lucene/dev/trunk/solr/test-framework/   (props changed)

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Sun Oct  5 14:01:13 2014
@@ -73,6 +73,10 @@ New Features
 * LUCENE-5911: Add MemoryIndex.freeze() to allow thread-safe searching over a 
   MemoryIndex. (Alan Woodward)
 
+* LUCENE-5969: Lucene 5.0 has a new index format with mismatched file detection,
+  improved exception handling, and indirect norms encoding for sparse fields.
+  (Mike McCandless, Robert Muir)
+
 API Changes
 
 * LUCENE-5900: Deprecated more constructors taking Version in *InfixSuggester and
@@ -142,6 +146,11 @@ API Changes
 * LUCENE-5924: Rename CheckIndex -fix option to -exorcise. This option does not
   actually fix the index, it just drops data.  (Robert Muir)
 
+* LUCENE-5969: Add Codec.compoundFormat, which handles the encoding of compound 
+  files. Add getMergeInstance() to codec producer APIs, which can be overridden
+  to return an instance optimized for merging instead of searching.
+  (Mike McCandless, Robert Muir)
+
 Bug Fixes
 
 * LUCENE-5650: Enforce read-only access to any path outside the temporary
@@ -193,6 +202,10 @@ Optimizations
   queries that match few documents by using a sparse bit set implementation.
   (Adrien Grand)
 
+* LUCENE-5969: Refactor merging to be more efficient, checksum calculation is
+  per-segment/per-producer, and norms and doc values merging no longer cause 
+  RAM spikes for latent fields. (Mike McCandless, Robert Muir)
+
 Build
 
 * LUCENE-5909: Smoke tester now has better command line parsing and

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/BitVector.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/BitVector.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/BitVector.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/BitVector.java Sun Oct  5 14:01:13 2014
@@ -23,7 +23,6 @@ import java.util.Arrays;
 import org.apache.lucene.codecs.CodecUtil;
 import org.apache.lucene.index.IndexFormatTooOldException;
 import org.apache.lucene.store.ChecksumIndexInput;
-import org.apache.lucene.store.CompoundFileDirectory;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
@@ -31,19 +30,11 @@ import org.apache.lucene.store.IndexOutp
 import org.apache.lucene.util.BitUtil;
 import org.apache.lucene.util.MutableBits;
 
-/** Optimized implementation of a vector of bits.  This is more-or-less like
- *  java.util.BitSet, but also includes the following:
- *  <ul>
- *  <li>a count() method, which efficiently computes the number of one bits;</li>
- *  <li>optimized read from and write to disk;</li>
- *  <li>inlinable get() method;</li>
- *  <li>store and load, as bit set or d-gaps, depending on sparseness;</li> 
- *  </ul>
- *
- *  @lucene.internal
+/** 
+ * Bitset for support of 4.x live documents
+ * @deprecated only for old 4.x segments
  */
-// pkg-private: if this thing is generally useful then it can go back in .util,
-// but the serialization must be here underneath the codec.
+@Deprecated
 final class BitVector implements Cloneable, MutableBits {
 
   private byte[] bits;
@@ -52,7 +43,7 @@ final class BitVector implements Cloneab
   private int version;
 
   /** Constructs a vector capable of holding <code>n</code> bits. */
-  public BitVector(int n) {
+  BitVector(int n) {
     size = n;
     bits = new byte[getNumBytes(size)];
     count = 0;
@@ -90,27 +81,6 @@ final class BitVector implements Cloneab
     count = -1;
   }
 
-  /** Sets the value of <code>bit</code> to true, and
-   *  returns true if bit was already set */
-  public final boolean getAndSet(int bit) {
-    if (bit >= size) {
-      throw new ArrayIndexOutOfBoundsException("bit=" + bit + " size=" + size);
-    }
-    final int pos = bit >> 3;
-    final int v = bits[pos];
-    final int flag = 1 << (bit & 7);
-    if ((flag & v) != 0)
-      return true;
-    else {
-      bits[pos] = (byte) (v | flag);
-      if (count != -1) {
-        count++;
-        assert count <= size;
-      }
-      return false;
-    }
-  }
-
   /** Sets the value of <code>bit</code> to zero. */
   @Override
   public final void clear(int bit) {
@@ -121,25 +91,6 @@ final class BitVector implements Cloneab
     count = -1;
   }
 
-  public final boolean getAndClear(int bit) {
-    if (bit >= size) {
-      throw new ArrayIndexOutOfBoundsException(bit);
-    }
-    final int pos = bit >> 3;
-    final int v = bits[pos];
-    final int flag = 1 << (bit & 7);
-    if ((flag & v) == 0) {
-      return false;
-    } else {
-      bits[pos] &= ~flag;
-      if (count != -1) {
-        count--;
-        assert count >= 0;
-      }
-      return true;
-    }
-  }
-
   /** Returns <code>true</code> if <code>bit</code> is one and
     <code>false</code> if it is zero. */
   @Override
@@ -150,7 +101,7 @@ final class BitVector implements Cloneab
 
   /** Returns the number of bits in this vector.  This is also one greater than
     the number of the largest valid bit number. */
-  public final int size() {
+  final int size() {
     return size;
   }
 
@@ -162,7 +113,7 @@ final class BitVector implements Cloneab
   /** Returns the total number of one bits in this vector.  This is efficiently
     computed and cached, so that, if the vector is not changed, no
     recomputation is done for repeated calls. */
-  public final int count() {
+  final int count() {
     // if the vector has been modified
     if (count == -1) {
       int c = 0;
@@ -177,7 +128,7 @@ final class BitVector implements Cloneab
   }
 
   /** For testing */
-  public final int getRecomputedCount() {
+  final int getRecomputedCount() {
     int c = 0;
     int end = bits.length;
     for (int i = 0; i < end; i++) {
@@ -191,30 +142,30 @@ final class BitVector implements Cloneab
   private static String CODEC = "BitVector";
 
   // Version before version tracking was added:
-  public final static int VERSION_PRE = -1;
+  final static int VERSION_PRE = -1;
 
   // First version:
-  public final static int VERSION_START = 0;
+  final static int VERSION_START = 0;
 
   // Changed DGaps to encode gaps between cleared bits, not
   // set:
-  public final static int VERSION_DGAPS_CLEARED = 1;
+  final static int VERSION_DGAPS_CLEARED = 1;
   
   // added checksum
-  public final static int VERSION_CHECKSUM = 2;
+  final static int VERSION_CHECKSUM = 2;
 
   // Increment version to change it:
-  public final static int VERSION_CURRENT = VERSION_CHECKSUM;
+  final static int VERSION_CURRENT = VERSION_CHECKSUM;
 
-  public int getVersion() {
+  int getVersion() {
     return version;
   }
 
   /** Writes this vector to the file <code>name</code> in Directory
     <code>d</code>, in a format that can be read by the constructor {@link
     #BitVector(Directory, String, IOContext)}.  */
-  public final void write(Directory d, String name, IOContext context) throws IOException {
-    assert !(d instanceof CompoundFileDirectory);
+  final void write(Directory d, String name, IOContext context) throws IOException {
+    assert !(d instanceof Lucene40CompoundReader);
     try (IndexOutput output = d.createOutput(name, context)) {
       output.writeInt(-2);
       CodecUtil.writeHeader(output, CODEC, VERSION_CURRENT);
@@ -230,7 +181,7 @@ final class BitVector implements Cloneab
   }
 
   /** Invert all bits */
-  public void invertAll() {
+  void invertAll() {
     if (count != -1) {
       count = size - count;
     }
@@ -254,13 +205,6 @@ final class BitVector implements Cloneab
     }
   }
 
-  /** Set all bits */
-  public void setAll() {
-    Arrays.fill(bits, (byte) 0xff);
-    clearUnusedBits();
-    count = size;
-  }
-     
   /** Write as a bit set */
   private void writeBits(IndexOutput output) throws IOException {
     output.writeInt(size());        // write size
@@ -325,7 +269,7 @@ final class BitVector implements Cloneab
   /** Constructs a bit vector from the file <code>name</code> in Directory
     <code>d</code>, as written by the {@link #write} method.
     */
-  public BitVector(Directory d, String name, IOContext context) throws IOException {
+  BitVector(Directory d, String name, IOContext context) throws IOException {
     try (ChecksumIndexInput input = d.openChecksumInput(name, context)) {
       final int firstInt = input.readInt();
 

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java Sun Oct  5 14:01:13 2014
@@ -18,8 +18,8 @@ package org.apache.lucene.codecs.lucene4
  */
 
 import org.apache.lucene.codecs.Codec;
+import org.apache.lucene.codecs.CompoundFormat;
 import org.apache.lucene.codecs.FieldInfosFormat;
-import org.apache.lucene.codecs.FilterCodec;
 import org.apache.lucene.codecs.LiveDocsFormat;
 import org.apache.lucene.codecs.PostingsFormat;
 import org.apache.lucene.codecs.SegmentInfoFormat;
@@ -30,17 +30,9 @@ import org.apache.lucene.codecs.TermVect
 import org.apache.lucene.codecs.perfield.PerFieldPostingsFormat;
 
 /**
- * Implements the Lucene 4.0 index format, with configurable per-field postings formats.
- * <p>
- * If you want to reuse functionality of this codec in another codec, extend
- * {@link FilterCodec}.
- *
- * @see org.apache.lucene.codecs.lucene40 package documentation for file format details.
+ * Reader for the 4.0 file format
  * @deprecated Only for reading old 4.0 segments
  */
-// NOTE: if we make largish changes in a minor release, easier to just make Lucene42Codec or whatever
-// if they are backwards compatible or smallish we can probably do the backwards in the postingsreader
-// (it writes a minor version, etc).
 @Deprecated
 public class Lucene40Codec extends Codec {
   private final StoredFieldsFormat fieldsFormat = new Lucene40StoredFieldsFormat();
@@ -48,6 +40,7 @@ public class Lucene40Codec extends Codec
   private final FieldInfosFormat fieldInfosFormat = new Lucene40FieldInfosFormat();
   private final SegmentInfoFormat infosFormat = new Lucene40SegmentInfoFormat();
   private final LiveDocsFormat liveDocsFormat = new Lucene40LiveDocsFormat();
+  private final CompoundFormat compoundFormat = new Lucene40CompoundFormat();
   
   private final PostingsFormat postingsFormat = new PerFieldPostingsFormat() {
     @Override
@@ -86,6 +79,11 @@ public class Lucene40Codec extends Codec
     return infosFormat;
   }
   
+  @Override
+  public CompoundFormat compoundFormat() {
+    return compoundFormat;
+  }
+
   private final DocValuesFormat defaultDVFormat = new Lucene40DocValuesFormat();
 
   @Override

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java Sun Oct  5 14:01:13 2014
@@ -19,119 +19,22 @@ package org.apache.lucene.codecs.lucene4
 
 import java.io.IOException;
 
-import org.apache.lucene.codecs.CodecUtil;
 import org.apache.lucene.codecs.DocValuesConsumer;
 import org.apache.lucene.codecs.DocValuesFormat;
 import org.apache.lucene.codecs.DocValuesProducer;
 import org.apache.lucene.index.IndexFileNames;
 import org.apache.lucene.index.SegmentReadState;
 import org.apache.lucene.index.SegmentWriteState;
-import org.apache.lucene.store.CompoundFileDirectory;
-import org.apache.lucene.store.DataOutput;
-import org.apache.lucene.util.packed.PackedInts;
 
 /**
  * Lucene 4.0 DocValues format.
- * <p>
- * Files:
- * <ul>
- *   <li><tt>.dv.cfs</tt>: {@link CompoundFileDirectory compound container}</li>
- *   <li><tt>.dv.cfe</tt>: {@link CompoundFileDirectory compound entries}</li>
- * </ul>
- * Entries within the compound file:
- * <ul>
- *   <li><tt>&lt;segment&gt;_&lt;fieldNumber&gt;.dat</tt>: data values</li>
- *   <li><tt>&lt;segment&gt;_&lt;fieldNumber&gt;.idx</tt>: index into the .dat for DEREF types</li>
- * </ul>
- * <p>
- * There are several many types of {@code DocValues} with different encodings.
- * From the perspective of filenames, all types store their values in <tt>.dat</tt>
- * entries within the compound file. In the case of dereferenced/sorted types, the <tt>.dat</tt>
- * actually contains only the unique values, and an additional <tt>.idx</tt> file contains
- * pointers to these unique values.
- * </p>
- * Formats:
- * <ul>
- *    <li>{@code VAR_INTS} .dat --&gt; Header, PackedType, MinValue, 
- *        DefaultValue, PackedStream</li>
- *    <li>{@code FIXED_INTS_8} .dat --&gt; Header, ValueSize, 
- *        {@link DataOutput#writeByte Byte}<sup>maxdoc</sup></li>
- *    <li>{@code FIXED_INTS_16} .dat --&gt; Header, ValueSize,
- *        {@link DataOutput#writeShort Short}<sup>maxdoc</sup></li>
- *    <li>{@code FIXED_INTS_32} .dat --&gt; Header, ValueSize,
- *        {@link DataOutput#writeInt Int32}<sup>maxdoc</sup></li>
- *    <li>{@code FIXED_INTS_64} .dat --&gt; Header, ValueSize,
- *        {@link DataOutput#writeLong Int64}<sup>maxdoc</sup></li>
- *    <li>{@code FLOAT_32} .dat --&gt; Header, ValueSize, Float32<sup>maxdoc</sup></li>
- *    <li>{@code FLOAT_64} .dat --&gt; Header, ValueSize, Float64<sup>maxdoc</sup></li>
- *    <li>{@code BYTES_FIXED_STRAIGHT} .dat --&gt; Header, ValueSize,
- *        ({@link DataOutput#writeByte Byte} * ValueSize)<sup>maxdoc</sup></li>
- *    <li>{@code BYTES_VAR_STRAIGHT} .idx --&gt; Header, TotalBytes, Addresses</li>
- *    <li>{@code BYTES_VAR_STRAIGHT} .dat --&gt; Header,
-          ({@link DataOutput#writeByte Byte} * <i>variable ValueSize</i>)<sup>maxdoc</sup></li>
- *    <li>{@code BYTES_FIXED_DEREF} .idx --&gt; Header, NumValues, Addresses</li>
- *    <li>{@code BYTES_FIXED_DEREF} .dat --&gt; Header, ValueSize,
- *        ({@link DataOutput#writeByte Byte} * ValueSize)<sup>NumValues</sup></li>
- *    <li>{@code BYTES_VAR_DEREF} .idx --&gt; Header, TotalVarBytes, Addresses</li>
- *    <li>{@code BYTES_VAR_DEREF} .dat --&gt; Header,
- *        (LengthPrefix + {@link DataOutput#writeByte Byte} * <i>variable ValueSize</i>)<sup>NumValues</sup></li>
- *    <li>{@code BYTES_FIXED_SORTED} .idx --&gt; Header, NumValues, Ordinals</li>
- *    <li>{@code BYTES_FIXED_SORTED} .dat --&gt; Header, ValueSize,
- *        ({@link DataOutput#writeByte Byte} * ValueSize)<sup>NumValues</sup></li>
- *    <li>{@code BYTES_VAR_SORTED} .idx --&gt; Header, TotalVarBytes, Addresses, Ordinals</li>
- *    <li>{@code BYTES_VAR_SORTED} .dat --&gt; Header,
- *        ({@link DataOutput#writeByte Byte} * <i>variable ValueSize</i>)<sup>NumValues</sup></li>
- * </ul>
- * Data Types:
- * <ul>
- *    <li>Header --&gt; {@link CodecUtil#writeHeader CodecHeader}</li>
- *    <li>PackedType --&gt; {@link DataOutput#writeByte Byte}</li>
- *    <li>MaxAddress, MinValue, DefaultValue --&gt; {@link DataOutput#writeLong Int64}</li>
- *    <li>PackedStream, Addresses, Ordinals --&gt; {@link PackedInts}</li>
- *    <li>ValueSize, NumValues --&gt; {@link DataOutput#writeInt Int32}</li>
- *    <li>Float32 --&gt; 32-bit float encoded with {@link Float#floatToRawIntBits(float)}
- *                       then written as {@link DataOutput#writeInt Int32}</li>
- *    <li>Float64 --&gt; 64-bit float encoded with {@link Double#doubleToRawLongBits(double)}
- *                       then written as {@link DataOutput#writeLong Int64}</li>
- *    <li>TotalBytes --&gt; {@link DataOutput#writeVLong VLong}</li>
- *    <li>TotalVarBytes --&gt; {@link DataOutput#writeLong Int64}</li>
- *    <li>LengthPrefix --&gt; Length of the data value as {@link DataOutput#writeVInt VInt} (maximum
- *                       of 2 bytes)</li>
- * </ul>
- * Notes:
- * <ul>
- *    <li>PackedType is a 0 when compressed, 1 when the stream is written as 64-bit integers.</li>
- *    <li>Addresses stores pointers to the actual byte location (indexed by docid). In the VAR_STRAIGHT
- *        case, each entry can have a different length, so to determine the length, docid+1 is 
- *        retrieved. A sentinel address is written at the end for the VAR_STRAIGHT case, so the Addresses 
- *        stream contains maxdoc+1 indices. For the deduplicated VAR_DEREF case, each length
- *        is encoded as a prefix to the data itself as a {@link DataOutput#writeVInt VInt} 
- *        (maximum of 2 bytes).</li>
- *    <li>Ordinals stores the term ID in sorted order (indexed by docid). In the FIXED_SORTED case,
- *        the address into the .dat can be computed from the ordinal as 
- *        <code>Header+ValueSize+(ordinal*ValueSize)</code> because the byte length is fixed.
- *        In the VAR_SORTED case, there is double indirection (docid -> ordinal -> address), but
- *        an additional sentinel ordinal+address is always written (so there are NumValues+1 ordinals). To
- *        determine the length, ord+1's address is looked up as well.</li>
- *    <li>{@code BYTES_VAR_STRAIGHT BYTES_VAR_STRAIGHT} in contrast to other straight 
- *        variants uses a <tt>.idx</tt> file to improve lookup perfromance. In contrast to 
- *        {@code BYTES_VAR_DEREF BYTES_VAR_DEREF} it doesn't apply deduplication of the document values.
- *    </li>
- * </ul>
- * <p>
- * Limitations:
- * <ul>
- *   <li> Binary doc values can be at most {@link #MAX_BINARY_FIELD_LENGTH} in length.
- * </ul>
  * @deprecated Only for reading old 4.0 and 4.1 segments
  */
 @Deprecated
-// NOTE: not registered in SPI, doesnt respect segment suffix, etc
-// for back compat only!
 public class Lucene40DocValuesFormat extends DocValuesFormat {
   
   /** Maximum length for each binary doc values field. */
-  public static final int MAX_BINARY_FIELD_LENGTH = (1 << 15) - 2;
+  static final int MAX_BINARY_FIELD_LENGTH = (1 << 15) - 2;
   
   /** Sole constructor. */
   public Lucene40DocValuesFormat() {
@@ -144,10 +47,10 @@ public class Lucene40DocValuesFormat ext
   }
   
   @Override
-  public DocValuesProducer fieldsProducer(SegmentReadState state) throws IOException {
+  public final DocValuesProducer fieldsProducer(SegmentReadState state) throws IOException {
     String filename = IndexFileNames.segmentFileName(state.segmentInfo.name, 
                                                      "dv", 
-                                                     IndexFileNames.COMPOUND_FILE_EXTENSION);
+                                                     Lucene40CompoundFormat.COMPOUND_FILE_EXTENSION);
     return new Lucene40DocValuesReader(state, filename, Lucene40FieldInfosReader.LEGACY_DV_TYPE_KEY);
   }
   

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java Sun Oct  5 14:01:13 2014
@@ -34,7 +34,6 @@ import org.apache.lucene.index.SegmentRe
 import org.apache.lucene.index.SortedDocValues;
 import org.apache.lucene.index.SortedNumericDocValues;
 import org.apache.lucene.index.SortedSetDocValues;
-import org.apache.lucene.store.CompoundFileDirectory;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.util.Accountable;
@@ -48,7 +47,6 @@ import org.apache.lucene.util.packed.Pac
 
 /**
  * Reads the 4.0 format of norms/docvalues
- * @lucene.experimental
  * @deprecated Only for reading old 4.0 and 4.1 segments
  */
 @Deprecated
@@ -66,12 +64,29 @@ final class Lucene40DocValuesReader exte
   private final Map<String,Accountable> instanceInfo = new HashMap<>();
 
   private final AtomicLong ramBytesUsed;
+  
+  private final boolean merging;
+  
+  // clone for merge: when merging we don't do any instances.put()s
+  Lucene40DocValuesReader(Lucene40DocValuesReader original) throws IOException {
+    assert Thread.holdsLock(original);
+    dir = original.dir;
+    state = original.state;
+    legacyKey = original.legacyKey;
+    numericInstances.putAll(original.numericInstances);
+    binaryInstances.putAll(original.binaryInstances);
+    sortedInstances.putAll(original.sortedInstances);
+    instanceInfo.putAll(original.instanceInfo);
+    ramBytesUsed = new AtomicLong(original.ramBytesUsed.get());
+    merging = true;
+  }
 
   Lucene40DocValuesReader(SegmentReadState state, String filename, String legacyKey) throws IOException {
     this.state = state;
     this.legacyKey = legacyKey;
-    this.dir = new CompoundFileDirectory(state.directory, filename, state.context, false);
+    this.dir = new Lucene40CompoundReader(state.directory, filename, state.context, false);
     ramBytesUsed = new AtomicLong(RamUsageEstimator.shallowSizeOf(getClass()));
+    merging = false;
   }
 
   @Override
@@ -116,7 +131,9 @@ final class Lucene40DocValuesReader exte
           IOUtils.closeWhileHandlingException(input);
         }
       }
-      numericInstances.put(field.name, instance);
+      if (!merging) {
+        numericInstances.put(field.name, instance);
+      }
     }
     return instance;
   }
@@ -133,8 +150,10 @@ final class Lucene40DocValuesReader exte
         values[i] = input.readLong();
       }
       long bytesUsed = RamUsageEstimator.sizeOf(values);
-      instanceInfo.put(field.name, Accountables.namedAccountable("long array", bytesUsed));
-      ramBytesUsed.addAndGet(bytesUsed);
+      if (!merging) {
+        instanceInfo.put(field.name, Accountables.namedAccountable("long array", bytesUsed));
+        ramBytesUsed.addAndGet(bytesUsed);
+      }
       return new NumericDocValues() {
         @Override
         public long get(int docID) {
@@ -145,8 +164,10 @@ final class Lucene40DocValuesReader exte
       final long minValue = input.readLong();
       final long defaultValue = input.readLong();
       final PackedInts.Reader reader = PackedInts.getReader(input);
-      instanceInfo.put(field.name, reader);
-      ramBytesUsed.addAndGet(reader.ramBytesUsed());
+      if (!merging) {
+        instanceInfo.put(field.name, reader);
+        ramBytesUsed.addAndGet(reader.ramBytesUsed());
+      }
       return new NumericDocValues() {
         @Override
         public long get(int docID) {
@@ -175,8 +196,10 @@ final class Lucene40DocValuesReader exte
     final byte values[] = new byte[maxDoc];
     input.readBytes(values, 0, values.length);
     long bytesUsed = RamUsageEstimator.sizeOf(values);
-    instanceInfo.put(field.name, Accountables.namedAccountable("byte array", bytesUsed));
-    ramBytesUsed.addAndGet(bytesUsed);
+    if (!merging) {
+      instanceInfo.put(field.name, Accountables.namedAccountable("byte array", bytesUsed));
+      ramBytesUsed.addAndGet(bytesUsed);
+    }
     return new NumericDocValues() {
       @Override
       public long get(int docID) {
@@ -199,8 +222,10 @@ final class Lucene40DocValuesReader exte
       values[i] = input.readShort();
     }
     long bytesUsed = RamUsageEstimator.sizeOf(values);
-    instanceInfo.put(field.name, Accountables.namedAccountable("short array", bytesUsed));
-    ramBytesUsed.addAndGet(bytesUsed);
+    if (!merging) {
+      instanceInfo.put(field.name, Accountables.namedAccountable("short array", bytesUsed));
+      ramBytesUsed.addAndGet(bytesUsed);
+    }
     return new NumericDocValues() {
       @Override
       public long get(int docID) {
@@ -223,8 +248,10 @@ final class Lucene40DocValuesReader exte
       values[i] = input.readInt();
     }
     long bytesUsed = RamUsageEstimator.sizeOf(values);
-    instanceInfo.put(field.name, Accountables.namedAccountable("int array", bytesUsed));
-    ramBytesUsed.addAndGet(bytesUsed);
+    if (!merging) {
+      instanceInfo.put(field.name, Accountables.namedAccountable("int array", bytesUsed));
+      ramBytesUsed.addAndGet(bytesUsed);
+    }
     return new NumericDocValues() {
       @Override
       public long get(int docID) {
@@ -247,8 +274,10 @@ final class Lucene40DocValuesReader exte
       values[i] = input.readLong();
     }
     long bytesUsed = RamUsageEstimator.sizeOf(values);
-    instanceInfo.put(field.name, Accountables.namedAccountable("long array", bytesUsed));
-    ramBytesUsed.addAndGet(bytesUsed);
+    if (!merging) {
+      instanceInfo.put(field.name, Accountables.namedAccountable("long array", bytesUsed));
+      ramBytesUsed.addAndGet(bytesUsed);
+    }
     return new NumericDocValues() {
       @Override
       public long get(int docID) {
@@ -271,8 +300,10 @@ final class Lucene40DocValuesReader exte
       values[i] = input.readInt();
     }
     long bytesUsed = RamUsageEstimator.sizeOf(values);
-    instanceInfo.put(field.name, Accountables.namedAccountable("float array", bytesUsed));
-    ramBytesUsed.addAndGet(bytesUsed);
+    if (!merging) {
+      instanceInfo.put(field.name, Accountables.namedAccountable("float array", bytesUsed));
+      ramBytesUsed.addAndGet(bytesUsed);
+    }
     return new NumericDocValues() {
       @Override
       public long get(int docID) {
@@ -295,8 +326,10 @@ final class Lucene40DocValuesReader exte
       values[i] = input.readLong();
     }
     long bytesUsed = RamUsageEstimator.sizeOf(values);
-    instanceInfo.put(field.name, Accountables.namedAccountable("double array", bytesUsed));
-    ramBytesUsed.addAndGet(bytesUsed);
+    if (!merging) {
+      instanceInfo.put(field.name, Accountables.namedAccountable("double array", bytesUsed));
+      ramBytesUsed.addAndGet(bytesUsed);
+    }
     return new NumericDocValues() {
       @Override
       public long get(int docID) {
@@ -325,7 +358,9 @@ final class Lucene40DocValuesReader exte
         default:
           throw new AssertionError();
       }
-      binaryInstances.put(field.name, instance);
+      if (!merging) {
+        binaryInstances.put(field.name, instance);
+      }
     }
     return instance;
   }
@@ -344,8 +379,10 @@ final class Lucene40DocValuesReader exte
       final PagedBytes.Reader bytesReader = bytes.freeze(true);
       CodecUtil.checkEOF(input);
       success = true;
-      ramBytesUsed.addAndGet(bytesReader.ramBytesUsed());
-      instanceInfo.put(field.name, bytesReader);
+      if (!merging) {
+        ramBytesUsed.addAndGet(bytesReader.ramBytesUsed());
+        instanceInfo.put(field.name, bytesReader);
+      }
       return new BinaryDocValues() {
 
         @Override
@@ -388,8 +425,10 @@ final class Lucene40DocValuesReader exte
       CodecUtil.checkEOF(index);
       success = true;
       long bytesUsed = bytesReader.ramBytesUsed() + reader.ramBytesUsed();
-      ramBytesUsed.addAndGet(bytesUsed);
-      instanceInfo.put(field.name, Accountables.namedAccountable("variable straight", bytesUsed));
+      if (!merging) {
+        ramBytesUsed.addAndGet(bytesUsed);
+        instanceInfo.put(field.name, Accountables.namedAccountable("variable straight", bytesUsed));
+      }
       return new BinaryDocValues() {
         @Override
         public BytesRef get(int docID) {
@@ -434,8 +473,10 @@ final class Lucene40DocValuesReader exte
       CodecUtil.checkEOF(data);
       CodecUtil.checkEOF(index);
       long bytesUsed = bytesReader.ramBytesUsed() + reader.ramBytesUsed();
-      ramBytesUsed.addAndGet(bytesUsed);
-      instanceInfo.put(field.name, Accountables.namedAccountable("fixed deref", bytesUsed));
+      if (!merging) {
+        ramBytesUsed.addAndGet(bytesUsed);
+        instanceInfo.put(field.name, Accountables.namedAccountable("fixed deref", bytesUsed));
+      }
       success = true;
       return new BinaryDocValues() {
         @Override
@@ -479,8 +520,10 @@ final class Lucene40DocValuesReader exte
       CodecUtil.checkEOF(data);
       CodecUtil.checkEOF(index);
       long bytesUsed = bytesReader.ramBytesUsed() + reader.ramBytesUsed();
-      ramBytesUsed.addAndGet(bytesUsed);
-      instanceInfo.put(field.name, Accountables.namedAccountable("variable deref", bytesUsed));
+      if (!merging) {
+        ramBytesUsed.addAndGet(bytesUsed);
+        instanceInfo.put(field.name, Accountables.namedAccountable("variable deref", bytesUsed));
+      }
       success = true;
       return new BinaryDocValues() {
         
@@ -543,7 +586,9 @@ final class Lucene40DocValuesReader exte
           IOUtils.closeWhileHandlingException(data, index);
         }
       }
-      sortedInstances.put(field.name, instance);
+      if (!merging) {
+        sortedInstances.put(field.name, instance);
+      }
     }
     return instance;
   }
@@ -564,8 +609,10 @@ final class Lucene40DocValuesReader exte
     final PagedBytes.Reader bytesReader = bytes.freeze(true);
     final PackedInts.Reader reader = PackedInts.getReader(index);
     long bytesUsed = bytesReader.ramBytesUsed() + reader.ramBytesUsed();
-    ramBytesUsed.addAndGet(bytesUsed);
-    instanceInfo.put(field.name, Accountables.namedAccountable("fixed sorted", bytesUsed));
+    if (!merging) {
+      ramBytesUsed.addAndGet(bytesUsed);
+      instanceInfo.put(field.name, Accountables.namedAccountable("fixed sorted", bytesUsed));
+    }
 
     return correctBuggyOrds(new SortedDocValues() {
       @Override
@@ -604,8 +651,10 @@ final class Lucene40DocValuesReader exte
 
     final int valueCount = addressReader.size() - 1;
     long bytesUsed = bytesReader.ramBytesUsed() + addressReader.ramBytesUsed() + ordsReader.ramBytesUsed();
-    ramBytesUsed.addAndGet(bytesUsed);
-    instanceInfo.put(field.name, Accountables.namedAccountable("var sorted", bytesUsed));
+    if (!merging) {
+      ramBytesUsed.addAndGet(bytesUsed);
+      instanceInfo.put(field.name, Accountables.namedAccountable("var sorted", bytesUsed));
+    }
 
     return correctBuggyOrds(new SortedDocValues() {
       @Override
@@ -692,6 +741,11 @@ final class Lucene40DocValuesReader exte
   }
 
   @Override
+  public synchronized DocValuesProducer getMergeInstance() throws IOException {
+    return new Lucene40DocValuesReader(this);
+  }
+
+  @Override
   public String toString() {
     return getClass().getSimpleName();
   }

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java Sun Oct  5 14:01:13 2014
@@ -19,79 +19,12 @@ package org.apache.lucene.codecs.lucene4
 
 import java.io.IOException;
 
-import org.apache.lucene.codecs.CodecUtil;
 import org.apache.lucene.codecs.FieldInfosFormat;
 import org.apache.lucene.codecs.FieldInfosReader;
 import org.apache.lucene.codecs.FieldInfosWriter;
-import org.apache.lucene.store.DataOutput; // javadoc
 
 /**
  * Lucene 4.0 Field Infos format.
- * <p>
- * <p>Field names are stored in the field info file, with suffix <tt>.fnm</tt>.</p>
- * <p>FieldInfos (.fnm) --&gt; Header,FieldsCount, &lt;FieldName,FieldNumber,
- * FieldBits,DocValuesBits,Attributes&gt; <sup>FieldsCount</sup></p>
- * <p>Data types:
- * <ul>
- *   <li>Header --&gt; {@link CodecUtil#checkHeader CodecHeader}</li>
- *   <li>FieldsCount --&gt; {@link DataOutput#writeVInt VInt}</li>
- *   <li>FieldName --&gt; {@link DataOutput#writeString String}</li>
- *   <li>FieldBits, DocValuesBits --&gt; {@link DataOutput#writeByte Byte}</li>
- *   <li>FieldNumber --&gt; {@link DataOutput#writeInt VInt}</li>
- *   <li>Attributes --&gt; {@link DataOutput#writeStringStringMap Map&lt;String,String&gt;}</li>
- * </ul>
- * </p>
- * Field Descriptions:
- * <ul>
- *   <li>FieldsCount: the number of fields in this file.</li>
- *   <li>FieldName: name of the field as a UTF-8 String.</li>
- *   <li>FieldNumber: the field's number. Note that unlike previous versions of
- *       Lucene, the fields are not numbered implicitly by their order in the
- *       file, instead explicitly.</li>
- *   <li>FieldBits: a byte containing field options.
- *       <ul>
- *         <li>The low-order bit is one for indexed fields, and zero for non-indexed
- *             fields.</li>
- *         <li>The second lowest-order bit is one for fields that have term vectors
- *             stored, and zero for fields without term vectors.</li>
- *         <li>If the third lowest order-bit is set (0x4), offsets are stored into
- *             the postings list in addition to positions.</li>
- *         <li>Fourth bit is unused.</li>
- *         <li>If the fifth lowest-order bit is set (0x10), norms are omitted for the
- *             indexed field.</li>
- *         <li>If the sixth lowest-order bit is set (0x20), payloads are stored for the
- *             indexed field.</li>
- *         <li>If the seventh lowest-order bit is set (0x40), term frequencies and
- *             positions omitted for the indexed field.</li>
- *         <li>If the eighth lowest-order bit is set (0x80), positions are omitted for the
- *             indexed field.</li>
- *       </ul>
- *    </li>
- *    <li>DocValuesBits: a byte containing per-document value types. The type
- *        recorded as two four-bit integers, with the high-order bits representing
- *        <code>norms</code> options, and the low-order bits representing 
- *        {@code DocValues} options. Each four-bit integer can be decoded as such:
- *        <ul>
- *          <li>0: no DocValues for this field.</li>
- *          <li>1: variable-width signed integers. ({@code Type#VAR_INTS VAR_INTS})</li>
- *          <li>2: 32-bit floating point values. ({@code Type#FLOAT_32 FLOAT_32})</li>
- *          <li>3: 64-bit floating point values. ({@code Type#FLOAT_64 FLOAT_64})</li>
- *          <li>4: fixed-length byte array values. ({@code Type#BYTES_FIXED_STRAIGHT BYTES_FIXED_STRAIGHT})</li>
- *          <li>5: fixed-length dereferenced byte array values. ({@code Type#BYTES_FIXED_DEREF BYTES_FIXED_DEREF})</li>
- *          <li>6: variable-length byte array values. ({@code Type#BYTES_VAR_STRAIGHT BYTES_VAR_STRAIGHT})</li>
- *          <li>7: variable-length dereferenced byte array values. ({@code Type#BYTES_VAR_DEREF BYTES_VAR_DEREF})</li>
- *          <li>8: 16-bit signed integers. ({@code Type#FIXED_INTS_16 FIXED_INTS_16})</li>
- *          <li>9: 32-bit signed integers. ({@code Type#FIXED_INTS_32 FIXED_INTS_32})</li>
- *          <li>10: 64-bit signed integers. ({@code Type#FIXED_INTS_64 FIXED_INTS_64})</li>
- *          <li>11: 8-bit signed integers. ({@code Type#FIXED_INTS_8 FIXED_INTS_8})</li>
- *          <li>12: fixed-length sorted byte array values. ({@code Type#BYTES_FIXED_SORTED BYTES_FIXED_SORTED})</li>
- *          <li>13: variable-length sorted byte array values. ({@code Type#BYTES_VAR_SORTED BYTES_VAR_SORTED})</li>
- *        </ul>
- *    </li>
- *    <li>Attributes: a key-value map of codec-private attributes.</li>
- * </ul>
- *
- * @lucene.experimental
  * @deprecated Only for reading old 4.0 and 4.1 segments
  */
 @Deprecated
@@ -103,7 +36,7 @@ public class Lucene40FieldInfosFormat ex
   }
 
   @Override
-  public FieldInfosReader getFieldInfosReader() throws IOException {
+  public final FieldInfosReader getFieldInfosReader() throws IOException {
     return reader;
   }
 

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java Sun Oct  5 14:01:13 2014
@@ -37,13 +37,10 @@ import org.apache.lucene.util.IOUtils;
 
 /**
  * Lucene 4.0 FieldInfos reader.
- * 
- * @lucene.experimental
- * @see Lucene40FieldInfosFormat
  * @deprecated Only for reading old 4.0 and 4.1 segments
  */
 @Deprecated
-class Lucene40FieldInfosReader extends FieldInfosReader {
+final class Lucene40FieldInfosReader extends FieldInfosReader {
 
   /** Sole constructor. */
   public Lucene40FieldInfosReader() {

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40LiveDocsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40LiveDocsFormat.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40LiveDocsFormat.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40LiveDocsFormat.java Sun Oct  5 14:01:13 2014
@@ -20,12 +20,10 @@ package org.apache.lucene.codecs.lucene4
 import java.io.IOException;
 import java.util.Collection;
 
-import org.apache.lucene.codecs.CodecUtil;
 import org.apache.lucene.codecs.LiveDocsFormat;
 import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.index.IndexFileNames;
 import org.apache.lucene.index.SegmentCommitInfo;
-import org.apache.lucene.store.DataOutput; // javadocs
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.util.Bits;
@@ -33,37 +31,10 @@ import org.apache.lucene.util.MutableBit
 
 /**
  * Lucene 4.0 Live Documents Format.
- * <p>
- * <p>The .del file is optional, and only exists when a segment contains
- * deletions.</p>
- * <p>Although per-segment, this file is maintained exterior to compound segment
- * files.</p>
- * <p>Deletions (.del) --&gt; Format,Header,ByteCount,BitCount, Bits | DGaps (depending
- * on Format)</p>
- * <ul>
- *   <li>Format,ByteSize,BitCount --&gt; {@link DataOutput#writeInt Uint32}</li>
- *   <li>Bits --&gt; &lt;{@link DataOutput#writeByte Byte}&gt; <sup>ByteCount</sup></li>
- *   <li>DGaps --&gt; &lt;DGap,NonOnesByte&gt; <sup>NonzeroBytesCount</sup></li>
- *   <li>DGap --&gt; {@link DataOutput#writeVInt VInt}</li>
- *   <li>NonOnesByte --&gt; {@link DataOutput#writeByte Byte}</li>
- *   <li>Header --&gt; {@link CodecUtil#writeHeader CodecHeader}</li>
- * </ul>
- * <p>Format is 1: indicates cleared DGaps.</p>
- * <p>ByteCount indicates the number of bytes in Bits. It is typically
- * (SegSize/8)+1.</p>
- * <p>BitCount indicates the number of bits that are currently set in Bits.</p>
- * <p>Bits contains one bit for each document indexed. When the bit corresponding
- * to a document number is cleared, that document is marked as deleted. Bit ordering
- * is from least to most significant. Thus, if Bits contains two bytes, 0x00 and
- * 0x02, then document 9 is marked as alive (not deleted).</p>
- * <p>DGaps represents sparse bit-vectors more efficiently than Bits. It is made
- * of DGaps on indexes of nonOnes bytes in Bits, and the nonOnes bytes themselves.
- * The number of nonOnes bytes in Bits (NonOnesBytesCount) is not stored.</p>
- * <p>For example, if there are 8000 bits and only bits 10,12,32 are cleared, DGaps
- * would be used:</p>
- * <p>(VInt) 1 , (byte) 20 , (VInt) 3 , (Byte) 1</p>
+ * @deprecated Only for reading old 4.x segments
  */
-public class Lucene40LiveDocsFormat extends LiveDocsFormat {
+@Deprecated
+public final class Lucene40LiveDocsFormat extends LiveDocsFormat {
 
   /** Extension of deletes */
   static final String DELETES_EXTENSION = "del";

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java Sun Oct  5 14:01:13 2014
@@ -25,21 +25,9 @@ import org.apache.lucene.codecs.NormsPro
 import org.apache.lucene.index.IndexFileNames;
 import org.apache.lucene.index.SegmentReadState;
 import org.apache.lucene.index.SegmentWriteState;
-import org.apache.lucene.store.CompoundFileDirectory;
 
 /**
  * Lucene 4.0 Norms Format.
- * <p>
- * Files:
- * <ul>
- *   <li><tt>.nrm.cfs</tt>: {@link CompoundFileDirectory compound container}</li>
- *   <li><tt>.nrm.cfe</tt>: {@link CompoundFileDirectory compound entries}</li>
- * </ul>
- * Norms are implemented as DocValues, so other than file extension, norms are 
- * written exactly the same way as {@link Lucene40DocValuesFormat DocValues}.
- * 
- * @see Lucene40DocValuesFormat
- * @lucene.experimental
  * @deprecated Only for reading old 4.0 and 4.1 segments
  */
 @Deprecated
@@ -57,7 +45,7 @@ public class Lucene40NormsFormat extends
   public NormsProducer normsProducer(SegmentReadState state) throws IOException {
     String filename = IndexFileNames.segmentFileName(state.segmentInfo.name, 
                                                      "nrm", 
-                                                     IndexFileNames.COMPOUND_FILE_EXTENSION);
+                                                     Lucene40CompoundFormat.COMPOUND_FILE_EXTENSION);
     return new Lucene40NormsReader(state, filename);
   }
 }

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java Sun Oct  5 14:01:13 2014
@@ -19,6 +19,7 @@ package org.apache.lucene.codecs.lucene4
 
 import java.io.IOException;
 
+import org.apache.lucene.codecs.DocValuesProducer;
 import org.apache.lucene.codecs.NormsProducer;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.NumericDocValues;
@@ -27,14 +28,18 @@ import org.apache.lucene.util.Accountabl
 
 /**
  * Reads 4.0/4.1 norms.
- * Implemented the same as docvalues, but with a different filename.
  * @deprecated Only for reading old 4.0 and 4.1 segments
  */
 @Deprecated
-class Lucene40NormsReader extends NormsProducer {
-  private final Lucene40DocValuesReader impl;
+final class Lucene40NormsReader extends NormsProducer {
+  private final DocValuesProducer impl;
   
-  public Lucene40NormsReader(SegmentReadState state, String filename) throws IOException {
+  // clone for merge
+  Lucene40NormsReader(DocValuesProducer impl) throws IOException {
+    this.impl = impl.getMergeInstance();
+  }
+  
+  Lucene40NormsReader(SegmentReadState state, String filename) throws IOException {
     impl = new Lucene40DocValuesReader(state, filename, Lucene40FieldInfosReader.LEGACY_NORM_TYPE_KEY);
   }
   
@@ -64,6 +69,11 @@ class Lucene40NormsReader extends NormsP
   }
   
   @Override
+  public NormsProducer getMergeInstance() throws IOException {
+    return new Lucene40NormsReader(impl);
+  }
+
+  @Override
   public String toString() {
     return getClass().getSimpleName() + "(" + impl + ")";
   }

Modified: lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java?rev=1629499&r1=1629498&r2=1629499&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java (original)
+++ lucene/dev/trunk/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java Sun Oct  5 14:01:13 2014
@@ -26,17 +26,13 @@ import org.apache.lucene.index.SegmentRe
 import org.apache.lucene.index.SegmentWriteState;
 
 /** 
- * Provides a {@link PostingsReaderBase} and {@link
- * PostingsWriterBase}.
- *
+ * PostingsReaderBase for 4.0 segments
  * @deprecated Only for reading old 4.0 segments */
-
-// TODO: should these also be named / looked up via SPI?
 @Deprecated
-public final class Lucene40PostingsBaseFormat extends PostingsBaseFormat {
+final class Lucene40PostingsBaseFormat extends PostingsBaseFormat {
 
   /** Sole constructor. */
-  public Lucene40PostingsBaseFormat() {
+  Lucene40PostingsBaseFormat() {
     super("Lucene40");
   }
 



Mime
View raw message