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

Sebastien Dionne commented on LUCENE-4816:
------------------------------------------

if I understand, the PostingsHighlighter, could return a portion of the text 
scan ?  In my call, I ask for 50 Passages Max, he did stop after 4 passages, 
before the text [0] wasn't found anymore.  That's fine here.  but for me the 
point of a Highlighter, is to Highlighter all the match (until the max 
occurences is found , here 50).  and return the text scanned with its 
highlights.

I see that Highlighter like a "FIND ALL" that will highlights the all the 
occurences of the word.  

by reading the javadoc, it's what I though this Highlighter was suppose to do.  
If not, I'll just have to create a new one that will do that.

                
> 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: BreakIteratorTest.java, package.html, 
> PassageFormatter.java, PassageFormatter-PATCH.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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to