[ 
https://issues.apache.org/jira/browse/LUCENE-4734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Lauck updated LUCENE-4734:
-------------------------------

    Attachment: lucene-fvh-slop-reverse.patch

I hope I'm not stepping on any toes here, but I realized my patch is similar to 
some of the work done in LUCENE-4118. My patch also solves the bug where 
repeated terms in a proximity query cause highlight matching to fail.

I also took a different approach to handling reverse order matching on slop 
queries so that this patch could be a complete alternative to LUCENE-4118. I 
modified QueryPhraseMap.add to detect PhraseQuerys with slop and create a 
second mapping for the phrase terms in reverse order - this way no other code 
needs to change to handle proximity phrase terms appearing in reverse order.

I added two simple test cases for both reverse ordering and repeated terms.
                
> FastVectorHighlighter Overlapping Proximity Queries Do Not Highlight
> --------------------------------------------------------------------
>
>                 Key: LUCENE-4734
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4734
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/highlighter
>    Affects Versions: 4.0, 4.1, 5.0
>            Reporter: Ryan Lauck
>              Labels: fastvectorhighlighter, highlighter
>             Fix For: 4.2, 5.0
>
>         Attachments: lucene-fvh-slop.patch, lucene-fvh-slop-reverse.patch
>
>
> If a proximity phrase query overlaps with any other query term it will not be 
> highlighted.
> Example Text:  A B C D E F G
> Example Queries: 
> "B E"~10 D
> (D will be highlighted instead of "B C D E")
> "B E"~10 "C F"~10
> (nothing will be highlighted)
> This can be traced to the FieldPhraseList constructor's inner while loop. 
> From the first example query, the first TermInfo popped off the stack will be 
> "B". The second TermInfo will be "D" which will not be found in the submap 
> for "B E"~10 and will trigger a failed match.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to