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

[jira] [Commented] (LUCENE-4896) PostingsHighlighter should use a interface of PassageFormatter instead of a class

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

Robert Muir commented on LUCENE-4896:
-------------------------------------

I agree there are a few bugs here:
# we should split PassageFormatter (abstract) from its default implementation.
# the default implementation should expose its params as protected, so its still extensible.

However I don't think an interface is best for this one: formatting is the key thing this class will do (as opposed to e.g. closeable). 
So I think it should be an abstract class, even if today its api is only one method, i expect this API might unfortunately grow larger :)
                
> 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
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org