You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2013/03/08 01:16:13 UTC

[jira] [Comment Edited] (LUCENE-4816) PassageFormatter in PostingsHighlighter trunk the message returned

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

Michael McCandless edited comment on LUCENE-4816 at 3/8/13 12:14 AM:
---------------------------------------------------------------------

Hmm the attached PassageFormatter.java doesn't have any change vs the 4.1.0 sources?  Maybe you attached the wrong version?

But, I'm not sure this change is correct, because with that change you'll be returning content outside of what the 4 Passages had specified?

Are you trying to highlight terms in the entire content (not just snippets/extracts)?
                
      was (Author: mikemccand):
    Hmm the attached PassageFormatter.java doesn't have any change vs the 4.1.0 sources?  Maybe you attached the wrong version?

But, I'm sure this change is correct, because with that change you'll be returning content outside of what the 4 Passages had specified?

Are you trying to highlight terms in the entire content (not just snippets/extracts)?
                  
> PassageFormatter in PostingsHighlighter trunk the message returned
> ------------------------------------------------------------------
>
>                 Key: LUCENE-4816
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4816
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/highlighter
>    Affects Versions: 4.1
>         Environment: NA
>            Reporter: Sebastien Dionne
>         Attachments: PassageFormatter.java
>
>
> when I try to highlight the word zero [0]  in the file : org\apache\lucene\search\postingshighlight\package.html
> the 2 last lines weren't return.  There are 4 Passages : 
> 2-65
> 277-434
> 434-735
> 735-968
> but the length of the file is 984.
> in the file : PassageFormatter.format(...)
> it should return all the original content with the words highlighted.
> PATCH
> need to add this at the end of the method
> // at line : 91 add this
> if(pos<content.length()){
>     sb.append(content.substring(pos));
> }
>     
> return sb.toString();

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