You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We override IndexSearcher#search(List<LeafReaderContext> leaves, Weight weight, Collector collector) and it contains the logic to apply time series desc optimisation for scanning segments in reverse for descending sort use-cases.
Existing Lucene 9.12.1 and OS 2.19 call flow
Lucene 10.1.0 and OS 3.0 call flow
With Lucene 10 changes, the new replacement method
Describe the bug
Description
We override
IndexSearcher#search(List<LeafReaderContext> leaves, Weight weight, Collector collector)
and it contains the logic to apply time series desc optimisation for scanning segments in reverse for descending sort use-cases.Existing Lucene 9.12.1 and OS 2.19 call flow
Lucene 10.1.0 and OS 3.0 call flow
With Lucene 10 changes, the new replacement method
only gets invoked via
IndexSearcher#search(Query, CollecterManager)
which is not used by OpenSearch inQueryPhase#searchWithCollector
.So, it was never getting called causing the time series desc optimization to be skipped.
My changes ensure it will be called in the same way that IndexSearcher does for CollectorManager variant.
Related Issues
PR for the fix #17329
Related component
Search:Performance
To Reproduce
Execute
asc_sort_timestamp
and compare the latency it will be slower with OS 3.0 compared to OS 2.19Expected behavior
Time Series Desc Optimisation should be invoked for sort queries.
Additional Details
Meta
The text was updated successfully, but these errors were encountered: