lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Glouser (JIRA)" <>
Subject [jira] Commented: (LUCENE-1310) Phrase query with term repeated 3 times requires more slop than expected
Date Mon, 30 Jun 2008 23:48:45 GMT


Grant Glouser commented on LUCENE-1310:

termPositionsDiffer can return the PhrasePositions that was passed in (pp), which means you
could be passing the same PhrasePositions to flip in both arguments.  But flip assumes that
the arguments are different.  This can result in an ArrayIndexOutOfBoundsException in flip.
 Perhaps just checking that pp2 != pp on line 76 would be sufficient to avoid this.

I have not been able to come up with a simple test case that triggers this.  I have a complex
one, but it uses a custom Analyzer.

> 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