[ 
https://issues.apache.org/jira/browse/LUCENE-2266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833614#action_12833614
 ] 

Robert Muir commented on LUCENE-2266:
-------------------------------------

Hi Joe, your patch looks correct to me, thanks! (btw, we do not need to add the 
casts for trunk, as it uses java 5, but if/when backported to 2.9.x we can add 
them).

I think we need to do the same thing with NGramTokenFilter, it looks broken too 
in the same way. I'll take your patch and see if i can add fixes to that one 
too... and both these filters need better tests to ensure these offsets work.

Thanks for the bug report and the fix!

> problem with edgengramtokenfilter and highlighter
> -------------------------------------------------
>
>                 Key: LUCENE-2266
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2266
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/analyzers
>    Affects Versions: 2.9.1
>            Reporter: Joe Calderon
>            Priority: Minor
>         Attachments: LUCENE-2266.patch
>
>
> i ran into a problem while using the edgengramtokenfilter, it seems to report 
> incorrect offsets when generating tokens, more specifically all the tokens 
> have offset 0 and term length as start and end, this leads to goofy 
> highlighting behavior when creating edge grams for tokens beyond the first 
> one, i created a small patch that takes into account the start of the 
> original token and adds that to the reported start/end offsets.

-- 
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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to