You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Dawid Weiss (Jira)" <ji...@apache.org> on 2022/02/04 16:25:00 UTC

[jira] [Resolved] (LUCENE-10406) Incorrect match with disjunction and extends interval

     [ https://issues.apache.org/jira/browse/LUCENE-10406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dawid Weiss resolved LUCENE-10406.
----------------------------------
    Resolution: Duplicate

https://issues.apache.org/jira/browse/LUCENE-10407

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org