[ https://issues.apache.org/jira/browse/LUCENE-7398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15504663#comment-15504663 ]
Paul Elschot commented on LUCENE-7398: -------------------------------------- I have started on working on a SpanNearQuery that contains this: {code} /** Specifies how clauses are to occur near each other in matching documents. */ public static enum MatchNear { /** Use this method for clauses that match when they are not ordered, * and the slop should be determined between the end and start positions of all clauses. * When the subspans vary in length, some matches may not be found. */ UNORDERED, /** Use this method for clauses that match when they are not ordered, * and the slop should be determined between the start positions of the first and last matching clauses. */ UNORDERED_STARTPOS, /** Use this method for clauses that can match when they are ordered and span collection is needed, * and the slop should be determined between the end and start positions of the clauses. * When the subspans vary in length, some matches may not be found. */ ORDERED_LAZY, /** Use this method for clauses that can match when they are ordered and span collection is needed, * and the slop should be determined between the end and start positions of the clauses. * When the subspans vary in length, some matches may not be found, * however this method finds more matches than {@link ORDERED_LAZY}. */ ORDERED_LOOKAHEAD, /** Use this method for clauses that match when they are ordered, * and the slop should be determined between the start positions of the first and last matching clauses. */ ORDERED_STARTPOS } {code} > Nested Span Queries are buggy > ----------------------------- > > Key: LUCENE-7398 > URL: https://issues.apache.org/jira/browse/LUCENE-7398 > Project: Lucene - Core > Issue Type: Bug > Components: core/search > Affects Versions: 5.5, 6.x > Reporter: Christoph Goller > Assignee: Alan Woodward > Priority: Critical > Attachments: LUCENE-7398-20160814.patch, LUCENE-7398.patch, > LUCENE-7398.patch, TestSpanCollection.java > > > Example for a nested SpanQuery that is not working: > Document: Human Genome Organization , HUGO , is trying to coordinate gene > mapping research worldwide. > Query: spanNear([body:coordinate, spanOr([spanNear([body:gene, body:mapping], > 0, true), body:gene]), body:research], 0, true) > The query should match "coordinate gene mapping research" as well as > "coordinate gene research". It does not match "coordinate gene mapping > research" with Lucene 5.5 or 6.1, it did however match with Lucene 4.10.4. It > probably stopped working with the changes on SpanQueries in 5.3. I will > attach a unit test that shows the problem. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org