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

David Smiley updated LUCENE-5503:
---------------------------------
    Attachment: LUCENE-5503.patch

Looks good Tim!  I like the tests.  I made some minor improvements to the code, 
somewhat making it similar to the conversion that WSTE does of MultiPhraseQuery 
in terms of keeping the positionGaps integer separate from slop.  And no loop 
is needed to calculate that gap.

p.s. when attaching patches, use the same file name for updates.  JIRA keeps 
all of them and clearly shows the latest.

> Trivial fixes to WeightedSpanTermExtractor
> ------------------------------------------
>
>                 Key: LUCENE-5503
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5503
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/highlighter
>    Affects Versions: 4.7
>            Reporter: Tim Allison
>            Assignee: David Smiley
>            Priority: Minor
>         Attachments: LUCENE-5503.patch, LUCENE-5503.patch, LUCENE-5503v2.patch
>
>
> The conversion of PhraseQuery to SpanNearQuery miscalculates the slop if 
> there are stop words in some cases.  The issue only really appears if there 
> is more than one intervening run of stop words: ab the cd the the ef.
> I also noticed that the inOrder determination is based on the newly 
> calculated slop, and it should probably be based on the original 
> phraseQuery.getSlop()
> patch and unit tests on way



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to