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

Michael McCandless commented on LUCENE-4906:
--------------------------------------------

Thanks Luca, that patch is nice.

I don't mind the generics ... but I do think this is added complexity (now 
there are two public classes, and <T> throughout) for what is a supremely 
expert use case.  This is why I opted initially for the Object + super-expert 
users simply cast it: it's minimal added complexity.  It also matches the 
current approach on LUCENE-5133 (though I had started with a class there to 
break each snippet into the match and non-match parts).

Unfortunately, highlighting APIs seem to quickly become complex / hard to use, 
and one of the awesome things about this highlighter is its API is very simple 
compared to the others ...
                
> 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