Thanks Robert!

Tom


> Start at SegmentMerger in both places.
>
> In 4.10.x you can see how it just validates every part of every reader
> in a naive loop:
>
> https://github.com/apache/lucene-solr/blob/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/SegmentMerger.java#L58
>
> in 5.x it is not done with this loop, instead responsibility for the
> merge is in the codec API.
> So this is done "fine-grained" for each part of the index, for example
> in stored fields, we verify each reader's stored fields portion right
> before we merge it in that individual piece:
>
> https://github.com/apache/lucene-solr/blob/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/StoredFieldsWriter.java#L82
>
> Note the default codec optimizes merge() more for stored fields and
> term vectors with a bulk byte copy that verifies as it copies.
> This bulk copy case is the typical case, when you aren't "upgrading"
> old segments, using something like SortingMergePolicy, etc:
>
> https://github.com/apache/lucene-solr/blob/branch_5x/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java#L355
>
>

Reply via email to