Closed expani closed 1 month ago
Makes sense for IntervalBuilder clients to use the existing IntervalsSource implementation. Also, safe to make public given the variable is static final. Approved!
LGTM. Can you add an entry to CHANGES.txt?
@romseygeek Should I add only under Lucene 10.0.0
or other versions as well ?
We can backport this to 9x so add the entry under the latest 9x version.
@jainankitk @romseygeek Requesting an approval.
Should I open a new issue, or should we revert this one and give a better solution?
Let's open a new issue and we can discuss a bit more about when you need such a thing and where it should live.
OK. Just for brevity: How does the one made public here differs from the already existing class (except that one returns null iterator while the other one returns an empty iterator)?
See #13388
From a quick look we can indeed replace everything with NoMatchIntervalIterator. I think there are some other places that we can make use of the null
shortcut as well - for example, DisjunctionIntervalsSource.create() can return null
if its input collection is empty.
Description
A bug was reported in OpenSearch which caused Interval Queries containing sub-query in rules to fail with
Sub-iterators of ConjunctionDISI are not on the same document
if an no_match query was generated after going through the search analyser.A similar issue was found in Lucene a few years back and was fixed by this PR
I am proposing to make
NO_INTERVALS
present in Lucene aspublic
so it can be used by it's clients like OpenSearch rather than creating a clone of the same.