You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2014/07/25 17:33:38 UTC

[jira] [Commented] (SOLR-6281) PostingsSolrHighlighter should be more configurable

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

David Smiley commented on SOLR-6281:
------------------------------------

A simple good-enough solution is to make the inner class extending PostingsHighlighter delegate out to protected methods on PSH for getting & initializing  the PassageFormatter and a few other things.  Then I could extend PostingsSolrHighlighter to override the method.

Following from that step, the components could have their classes declared in solrconfig.xml.  But that would probably mean a new SolrPassageFormatter class.  I'm not sure if I want to bother going that far down the configurability road right now. 

As an aside... it's a shame that these different highlighters don't share more abstractions and terminology that seem orthogonal.  That is, a "Passage" is conceptually the same as "Fragment".  I appreciate that different highlighters work differently and thus have somewhat different data associated with them.

> PostingsSolrHighlighter should be more configurable
> ---------------------------------------------------
>
>                 Key: SOLR-6281
>                 URL: https://issues.apache.org/jira/browse/SOLR-6281
>             Project: Solr
>          Issue Type: Improvement
>          Components: highlighter
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>
> The DefaultSolrHighlighter (works on non-FVH and FVH modes) and PostingsSolrHighlighter are quite different, although they do share some highlighting parameters where it's directly applicable.  DSH has its fragListBuilder, fragmentsBuilder, boundaryScanner, configurable by letting you defined your own class in solrconfig.xml.  PSH does not; it uses the Lucene default implementations of DefaultPassageFormatter, PassageScorer, and Java BreakIterator, though it configures each of them based on options. I have a case where I need to provide a custom PassageFormatter, for example.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org