You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Michal Gielda (JIRA)" <ji...@apache.org> on 2010/03/01 06:35:05 UTC
[jira] Commented: (SOLR-1494) Bind highlighting info using SolrJ's
DocumentObjectBinder
[ https://issues.apache.org/jira/browse/SOLR-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839554#action_12839554 ]
Michal Gielda commented on SOLR-1494:
-------------------------------------
I would greatly appreciate this patch and probably so would many others - the way highlighting is done right now is way too complicated, while what you came up with is very neat indeed!
Cheers,
Michael
> Bind highlighting info using SolrJ's DocumentObjectBinder
> ---------------------------------------------------------
>
> Key: SOLR-1494
> URL: https://issues.apache.org/jira/browse/SOLR-1494
> Project: Solr
> Issue Type: New Feature
> Components: clients - java
> Reporter: Avlesh Singh
> Priority: Minor
> Fix For: 1.5
>
>
> The DocumentObjectBinder class should "bind" highlighting info in QueryResponse, if specified by a end user. This can be achieved using an annotated interface {{@Highlight}} as underneath -
> {code:java}
> class MyBean{
> @Field
> @Highlight
> String name;
> @Field ("solr_category_field_name")
> List<String> categories;
> @Highlight ("solr_category_field_name")
> List<String> highlightedCategories
> @Field
> float score;
> ...
> }
> {code}
> With this bean definition, if someone tries to fetch the response as {{QueryResponse#getBeans(MyBean.class)}}, the beans will have highlighting data populated into its corresponding fields.
> Original mail thread here - http://www.lucidimagination.com/search/document/897f5a26e35bd27e/highlighting_bean_properties_using_documentobjectbinder_new_feature
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.