mayya-sharipova opened a new issue, #16425: URL: https://github.com/apache/lucene/issues/16425
`IndexOrDocValuesQuery` chooses between the index side and the doc-values side using a cost heuristic that predates doc-values skippers. The decision is driven by the index side's cost (with a fixed penalty applied to doc values); it has no awareness that the doc-values side may carry a DocValuesSkipper. When a skipper is present and effective (values well-correlated with doc order, e.g. a primary/secondary index sort or naturally monotonic data), the doc-values side can skip whole blocks and be dramatically cheaper than the index side. But because the skipper never enters the cost model, IndexOrDocValuesQuery keeps choosing the index side — particularly for a standalone range, where it always does — and the skipper's benefit is left on the table. The core gap is that the doc-values range scorer doesn't expose a meaningful, skipper-aware cost for the planner to use (see #15981, where SkipBlockRangeIterator.cost() currently returns NO_MORE_DOCS). ### Related issues - #15981 — Improve clause ordering for multi-field DocValues range conjunctions (same missing primitive: a skipper-aware DV cost()) - #12483 — TermsQuery as MultiTermQuery can dramatically overestimate its cost (the index-side half of the same heuristic) - #13442 — Instrument IndexOrDocValuesQuery to report on its decisions - #15954 — SortedNumericDocValuesRangeQuery now uses a skipper-backed iterator - #15139 — Optimize filtering on the primary index sort field -- 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]
