[ 
https://issues.apache.org/jira/browse/LUCENE-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13799443#comment-13799443
 ] 

Greg Dearing commented on LUCENE-3229:
--------------------------------------

I don't think Paul's questions weren't directed at me, but to add my thoughts:

I also don't see a need for backward compatibility.  This feels like a bug fix, 
though I suppose that could be argued.  If there ends up being a strong desire 
for compatibility, maybe I could add a new constructor:
{code}
public SpanNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, boolean 
collectPayloads, boolean allowOverlap)
{code}

This would enable the original behavior and also add the 
unordered/not-overlapping case.  Neither feels especially useful.

Also, I'm a little uncertain about the workflow.  Your test change seems 
reasonable to me; would you like me to generate a new patch incorporating it?


> SpanNearQuery: ordered spans should not overlap
> -----------------------------------------------
>
>                 Key: LUCENE-3229
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3229
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 3.1
>         Environment: Windows XP, Java 1.6
>            Reporter: ludovic Boutros
>             Fix For: 4.6
>
>         Attachments: LUCENE-3229.patch, LUCENE-3229.patch, LUCENE-3229.patch, 
> SpanOverlap2.diff, SpanOverlap.diff, SpanOverlapTestUnit.diff
>
>
> While using Span queries I think I've found a little bug.
> With a document like this (from the TestNearSpansOrdered unit test) :
> "w1 w2 w3 w4 w5"
> If I try to search for this span query :
> spanNear([spanNear([field:w3, field:w5], 1, true), field:w4], 0, true)
> the above document is returned and I think it should not because 'w4' is not 
> after 'w5'.
> The 2 spans are not ordered, because there is an overlap.
> I will add a test patch in the TestNearSpansOrdered unit test.
> I will add a patch to solve this issue too.
> Basicaly it modifies the two docSpansOrdered functions to make sure that the 
> spans does not overlap.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to