Upgrade to Lucene 10.2.2 (#129546)

This commit upgrades to Upgrade to Lucene 10.2.2.

With the release of 10.2.2, we no longer need to workaround the Lucene bug mentioned in 128671.
This commit is contained in:
Chris Hegarty 2025-06-22 13:37:22 +01:00 committed by GitHub
parent 6a1a862aea
commit 1255a64832
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 116 additions and 862 deletions

View file

@ -21,6 +21,7 @@ import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.search.IndexOrDocValuesQuery;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.IndexSortSortedNumericDocValuesRangeQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.SortField;
@ -28,7 +29,6 @@ import org.apache.lucene.search.SortedNumericSortField;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.lucene.search.XIndexSortSortedNumericDocValuesRangeQuery;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
@ -295,7 +295,7 @@ public class DateFieldMapperDocValuesSkipperBenchmark {
/**
* Runs the actual Lucene range query, optionally combining a {@link LongPoint} index query
* with doc values ({@link SortedNumericDocValuesField}) via {@link IndexOrDocValuesQuery},
* and then wrapping it with an {@link XIndexSortSortedNumericDocValuesRangeQuery} to utilize the index sort.
* and then wrapping it with an {@link IndexSortSortedNumericDocValuesRangeQuery} to utilize the index sort.
*
* @param searcher the Lucene {@link IndexSearcher}
* @param rangeStartTimestamp lower bound of the timestamp range
@ -316,7 +316,7 @@ public class DateFieldMapperDocValuesSkipperBenchmark {
)
: SortedNumericDocValuesField.newSlowRangeQuery(TIMESTAMP_FIELD, rangeStartTimestamp, rangeEndTimestamp);
final Query query = new XIndexSortSortedNumericDocValuesRangeQuery(
final Query query = new IndexSortSortedNumericDocValuesRangeQuery(
TIMESTAMP_FIELD,
rangeStartTimestamp,
rangeEndTimestamp,