Description
This query:
Query q1 = new IntervalQuery( FLD_TEXT1, Intervals.ordered( Intervals.atLeast(1, Intervals.term("foo")), Intervals.atLeast(1, Intervals.term("bar"))));
produces an NPE when retrieving match regions. Note degenerate atLeast with only one argument - this may play a role but it's not signaled anywhere before (the query itself does select the right documents, NPE blows up when matches are retrieved).
Stack:
java.lang.NullPointerException at __randomizedtesting.SeedInfo.seed([2DDAAECF04D90D2F:EB69410397F8761E]:0) at org.apache.lucene.queries.intervals.MinimumShouldMatchIntervalsSource$MinimumMatchesIterator.getSubMatches(MinimumShouldMatchIntervalsSource.java:389) at org.apache.lucene.queries.intervals.CachingMatchesIterator.cache(CachingMatchesIterator.java:39) at org.apache.lucene.queries.intervals.CachingMatchesIterator.next(CachingMatchesIterator.java:68) at org.apache.lucene.queries.intervals.IntervalMatches$2.nextInterval(IntervalMatches.java:137) at org.apache.lucene.queries.intervals.OrderedIntervalsSource$OrderedIntervalIterator.nextInterval(OrderedIntervalsSource.java:166) at org.apache.lucene.queries.intervals.ConjunctionIntervalsSource.matches(ConjunctionIntervalsSource.java:89) at org.apache.lucene.queries.intervals.IntervalQuery$IntervalWeight.lambda$matches$0(IntervalQuery.java:177) at org.apache.lucene.search.MatchesUtils.forField(MatchesUtils.java:115) at org.apache.lucene.queries.intervals.IntervalQuery$IntervalWeight.matches(IntervalQuery.java:174) at org.apache.lucene.search.matchhighlight.MatchRegionRetriever.highlightDocument(MatchRegionRetriever.java:210) at org.apache.lucene.search.matchhighlight.MatchRegionRetriever.highlightDocuments(MatchRegionRetriever.java:193) at org.apache.lucene.search.matchhighlight.MatchRegionRetriever.highlightDocuments(MatchRegionRetriever.java:146) at org.apache.lucene.search.matchhighlight.MatchHighlighter.highlight(MatchHighlighter.java:236) at org.apache.lucene.search.matchhighlight.TestMatchHighlighter.lambda$testNpeOnIntervalQuery$7(TestMatchHighlighter.java:540) at org.apache.lucene.search.matchhighlight.IndexBuilder.build(IndexBuilder.java:100) at org.apache.lucene.search.matchhighlight.TestMatchHighlighter.testNpeOnIntervalQuery(TestMatchHighlighter.java:510) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564)
Repro test attached.
romseygeek, help!