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

Luca Cavanna commented on LUCENE-4906:
--------------------------------------

Hi Mike,
I definitely agree that highlighting api should be simple and the postings 
highlighter is probably the only one that's really easy to use.

On the other hand, I think it's good to make explicit that if you use a 
Formatter<YourObject>, YourObject is what you're going to get back from the 
highlighter. People using the string version wouldn't notice the change, while 
advanced users would have to extend the base class and get type safety too, 
that in my opinion makes it clearier and easier. Using Object feels to me a 
little old-fashioned and bogus, but again that's probably me :)

I do trust your experience though. If you think the object version is better 
that's fine with me. What I care about is that this improvement gets committed 
soon, since it's a really useful one ;)

Thanks a lot for sharing your ideas
                
> 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
>         Attachments: 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to