[
https://issues.apache.org/jira/browse/LUCENE-5332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13816358#comment-13816358
]
Paul Elschot commented on LUCENE-5332:
--------------------------------------
I think the problem is actually only in the javadocs of SpanNearQuery that do
not state that when it is ordered, it will only match non overlapping Spans,
but when it is unordered, overlapping Spans can match.
In the patch here a non ordered SpanNearQuery is used, and that will allow two
subqueries for "d" (for example) to match on the same "d" position.
It might be possible to add an extra boolean parameter to the constructor to
allow overlap or not, but that would require some coding and careful testing.
> SpanNearQuery with multiple terms does not find match
> -----------------------------------------------------
>
> Key: LUCENE-5332
> URL: https://issues.apache.org/jira/browse/LUCENE-5332
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Jerry Zhou
> Attachments: MultiTermFlatSpanNearTest.java
>
>
> A flat structure (non-nested) for a SpanNearQuery containing multiple terms
> does not always find the correct match.
> Test case is attached ...
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]