[
https://issues.apache.org/jira/browse/LUCENE-6581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14591676#comment-14591676
]
Robert Muir commented on LUCENE-6581:
-------------------------------------
in PostingsHighlighter:
{code}
protected PassageFormatter getFormatter(String field) {
{code}
This class has only one method:
{code}
public abstract Object format(Passage passages[], String content);
{code}
So I think its pretty easy to do what you want by plugging in there.
> Adjust PostingsHighlighter API to allow access to Passage[]
> -----------------------------------------------------------
>
> Key: LUCENE-6581
> URL: https://issues.apache.org/jira/browse/LUCENE-6581
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/other
> Reporter: robert.onslow
> Labels: highlighter
>
> I need to access the offset of the terms in the document. I believe that
> Passage holds this data, but the PostingsHighlighter API does not expose a
> method returning Passage[] - only String[]. Would it be possible/be a good
> idea to expose a method returning Passage[].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]