lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Updated: (LUCENE-569) NearSpans skipTo bug
Date Thu, 26 Oct 2006 23:33:17 GMT
     [ ]

Hoss Man updated LUCENE-569:

    Attachment: LUCENE-569.ubber.patch

Okay, I've attached a cosolidation of SpanScorer.explain.testcase.patch and NearSpans20060903.patch,
with a few small modifications...

  1) renamed to
  2) renamed some tst* methods test* (I think Paul had disabled them for faster testing 
      since they weren't broken, but they provide good coverage)
  3) removed some javadocs from NearSpansOrdered so they are inherited from Spans
      (they were the same)

I can't say I completely understand everything going on in all of this code ... but it passes
all of the existing unit tests (as well as the new ones) and I trust Paul; so in the spirit
of "be bold" I'll commit these tomorow unless anyone objects.

To recap the major issues for people who may not be familiar with this issue...

   * The existing NearSpans, which used in an "inOrder" SpanNear query, has a bug 
     where it fails to recognize ordered spans if they overlap with unordered spans.
   * Paul has proposed a fix by eliminating the NearSpans class and replacing it with 
     both NearSpansOrdered and NearSpansUnordered - SpanNearQuery will pick the
     appropriate class when getSpans is called.

> NearSpans skipTo bug
> --------------------
>                 Key: LUCENE-569
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>            Reporter: Hoss Man
>         Attachments: common-build.assertions.patch, LUCENE-569.ubber.patch, NearSpans20060903.patch,,, SpanNearQuery20060622.patch, SpanScorer.explain.testcase.patch,
> NearSpans appears to have a bug in skipTo that causes it to skip over some matching documents
completely.  I discovered this bug while investigating problems with SpanWeight.explain, but
as far as I can tell the Bug is not specific to Explanations ... it seems like it could potentially
result in incorrect matching in some situations where a SpanNearQuery is nested in another
query such thatskipTo will be used ... I tried to create a high level test case to exploit
the bug when searching, but i could not.  TestCase exploiting the class using NearSpan and
SpanScorer will follow...

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message