lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4860) PostingsHighlighter should pass field name to PassageFormatter.format?
Date Wed, 20 Mar 2013 16:15:16 GMT


Robert Muir commented on LUCENE-4860:

Yeah the current API is bogus. The idea of the getMatchTerms was just thinking about different
terms having different colors, but the API was never adjusted after multiple fields were added
to this thing.

So I think passing fieldName + changing matchTerms to just be the bytes sounds good. 

Alternatively we could put fieldName in the passage too, but thats confusing because you have
N of them.
> PostingsHighlighter should pass field name to PassageFormatter.format?
> ----------------------------------------------------------------------
>                 Key: LUCENE-4860
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, 4.3
> If the app needs to render different fields (eg multi-valued vs single-valued) differently
it's tricky now.
> You can do Passage[0].getMatchTerms()[0].field(), but then that doesn't work if that
field hit the empty highlight.
> I think we should pass the fieldName to format directly?  And then maybe change getMatchTerms()
to return BytesRef[] instead (the field name is redundant: they are all the same for all passages
passed to format).

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:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message