[ https://issues.apache.org/jira/browse/LUCENE-10406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487132#comment-17487132 ]
Dawid Weiss commented on LUCENE-10406: -------------------------------------- I didn't have a chance to look yet but I think something wrong is happening in disjunction iterator because if you comment out the first Intervals.term(xxx) clause, everything works just fine. > Incorrect match with disjunction and extends interval > ----------------------------------------------------- > > Key: LUCENE-10406 > URL: https://issues.apache.org/jira/browse/LUCENE-10406 > Project: Lucene - Core > Issue Type: Bug > Affects Versions: 9.0, 8.11.1 > Reporter: Dawid Weiss > Priority: Major > > This is a trimmed down code that matches, even though it shouldn't: > {code:java} > @Test > public void testBug() throws Exception { > try (Directory dir = new ByteBuffersDirectory(); > IndexWriter w = new IndexWriter(dir, new IndexWriterConfig(new > WhitespaceAnalyzer()))) { > String field = "field"; > Document doc = new Document(); > doc.add(new TextField(field, "indeed foo alan is great bar bar", > Field.Store.YES)); > w.addDocument(doc); > try (DirectoryReader reader = DirectoryReader.open(w)) { > IndexSearcher searcher = new IndexSearcher(reader); > var q4 = > new IntervalQuery( > field, > Intervals.or( > Intervals.term("xxx"), > Intervals.containing( > Intervals.extend(Intervals.term("alan"), 0, 10), > Intervals.term("indeed")))); > TopDocs search = searcher.search(q4, 100); > assertEquals(0, search.totalHits.value); > } > } > } {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org