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

Paul Elschot commented on LUCENE-3229:
--------------------------------------

To reduce surprises like this one when nested spans are used, the ordered case 
might be changed to require no overlap at all.
To do that one could compare the end of one spans with the beginning of the 
next one.

AFAIK none of the existing test cases uses a nested span query, so more some 
test cases for that would be good to have.

The docSpansOrdered method in NearSpansUnordered from the SpanOverLap2.diff 
patch
is the same as the existing docSpansOrdered method in NearSpansOrdered. 
That is probably not intended.

Could you provide patches as decribed here: 
http://wiki.apache.org/lucene-java/HowToContribute ?


> Overlaped SpanNearQuery
> -----------------------
>
>                 Key: LUCENE-3229
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3229
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 3.1
>         Environment: Windows XP, Java 1.6
>            Reporter: ludovic Boutros
>            Priority: Minor
>         Attachments: SpanOverlap.diff, SpanOverlap2.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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to