lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul (JIRA)" <>
Subject [jira] Updated: (SOLR-536) Automatic binding of results to Beans (for solrj)
Date Wed, 16 Apr 2008 10:57:21 GMT


Noble Paul updated SOLR-536:

    Attachment: SOLR-536.patch

First cut . 
There is a Class DocumentObjectBinder used by QueryResponse.

The testcase demonstrates the usage.
The annotation can be applied on a setter method also.

Do we need binding for dynamic fields like

String a_t: 

Should it do automatic type conversion.?
 i.e solr gives the field as say int and the bean has the field as String

> Automatic binding of results to Beans (for solrj)
> -------------------------------------------------
>                 Key: SOLR-536
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Priority: Minor
>             Fix For: 1.3
>         Attachments: SOLR-536.patch
> as we are using java5 .we can use annotations to bind SolrDocument to java beans directly.
> This can make the usage of solrj a  bit simpler
> The QueryResponse class in solrj can have an extra method as follows
> public <T> List<T> getResultBeans(Class<T> klass)
> and the bean can have annotations as
> class MyBean{
> @Field("id") //name is optional
> String id;
> @Field("category")
> List<String> categories
> }

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message