jpountz opened a new pull request, #12622:
URL: https://github.com/apache/lucene/pull/12622
This adds `BPReorderingMergePolicy`, a merge policy wrapper that reorders
doc IDs on merge using a `BPIndexReorderer`.
- Reordering always run on forced merges.
- A `minNaturalMergeNumDocs` parameter helps only enable reordering on the
larger merged segments. This way, small merges retain all merging optimizations
like bulk copying of stored fields, and only the larger segments - which are
the most important for search performance - get reordered.
- If not enough RAM is available to perform reordering, reordering is
skipped.
To make this work, I had to add the ability for any merge to reorder doc IDs
of the merged segment via `OneMerge#reorder`. `MockRandomMergePolicy` from the
test framework randomly reverts the order of documents in a merged segment to
make sure this logic is properly exercised.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]