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.

Reply via email to