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

Luca Cavanna updated LUCENE-4896:
---------------------------------

    Attachment: LUCENE-4896.patch

Patch against trunk. 

In this first iteration I made PassageFormatter an interface and created a 
DefaultPassageFormatter, made also protected its fields.

Maybe we should make protected the append method too. I can imagine people 
might want to modify the snippets before adding them to the string builder. The 
current impl can only escape html, but maybe some people would like to remove 
html tags at all. Maybe even better to make a proper protected method for that?

I thought about using an abstract class but wasn't really sure what to make 
abstract and what to put in it. What do you think Robert?



                
> PostingsHighlighter should use a interface of PassageFormatter instead of a 
> class
> ---------------------------------------------------------------------------------
>
>                 Key: LUCENE-4896
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4896
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/highlighter
>    Affects Versions: 4.2
>         Environment: NA
>            Reporter: Sebastien Dionne
>              Labels: newdev
>         Attachments: LUCENE-4896.patch
>
>
> In my project I need a custom PassageFormatter to use with 
> PostingsHighlighter.  I extended PassageFormatter  to override format(...)
> but if I do that, I don't have access to the private variables.  So instead 
> of changing the scope to protected, it should be more usefull to use a 
> interface for PassageFormatter.
> like public DefaultPassageFormatter implements PassageFormatter.

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

Reply via email to