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

Robert Muir commented on LUCENE-4906:
-------------------------------------

Well I think its good for a few reasons:
1. even though protected still keeps it in javadocs, users who use an IDE and 
type "highlighter." and wait for autocomplete see less methods in their API. so 
its still less overwhelming here. This is the most important benefit.
2. encourages users to e.g. implement their public own method with a proper 
return value (e.g. JsonObject or whatever it is you are doing). This way there 
is just one cast from object and its contained inside their custom Highlighter, 
otherwise there rest of their app is type safe.

and I think the functionality of highlighting to something *other than string* 
is sufficiently custom that its not really an imposition. Are there other 
expert methods in PH that belong in the same category?
                
> PostingsHighlighter's PassageFormatter should allow for rendering to 
> arbitrary objects
> --------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4906
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4906
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, 4.6
>
>         Attachments: LUCENE-4906.patch, LUCENE-4906.patch, LUCENE-4906.patch
>
>
> For example, in a server, I may want to render the highlight result to 
> JsonObject to send back to the front-end. Today since we render to string, I 
> have to render to JSON string and then re-parse to JsonObject, which is 
> inefficient...
> Or, if (Rob's idea:) we make a query that's like MoreLikeThis but it pulls 
> terms from snippets instead, so you get proximity-influenced salient/expanded 
> terms, then perhaps that renders to just an array of tokens or fragments or 
> something from each snippet.

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to