lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <>
Subject [jira] Updated: (LUCENE-1310) Phrase query with term repeated 3 times requires more slop than expected
Date Sat, 28 Jun 2008 20:19:45 GMT


Doron Cohen updated LUCENE-1310:

    Attachment: LUCENE-1310.patch

Previous patch might restore the queue wrongly - pop pp but put pp2.
This patch fixes that by returning the correct pp into the pq.
However it is yet not perfect since the one pp returned to pq might not be the last one advanced.
This means pq could be sorted incorrectly with regard to repeating terms.
I didn't manage to create a test case that fails due to this - testDoc4_Query3_All_Slops_Should_match
in the test was the last trial to catch this.
The only perfect solution I see is to re-populate the queue when this happens but this is
costly and I tend not to do it.
Open for suggestions...

> Phrase query with term repeated 3 times requires more slop than expected
> ------------------------------------------------------------------------
>                 Key: LUCENE-1310
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.3.1, 2.3.2
>            Reporter: Grant Glouser
>            Assignee: Doron Cohen
>         Attachments: LUCENE-1310.1.patch, LUCENE-1310.patch, LUCENE-1310.patch, LUCENE-1310.patch,
> Consider a document with the text "A A A".
> The phrase query "A A A" (exact match) succeeds.
> The query "A A A"~1 (same document and query, just increasing the slop value by one)
> "A A A"~2 succeeds again.
> If the exact match succeeds, I wouldn't expect the same query but with more slop to fail.
 The fault seems to require some term to be repeated at least three times in the query, but
the three occurrences do not need to be adjacent.  I will attach a file that contains a set
of JUnit tests that demonstrate what I mean.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message