[
https://issues.apache.org/jira/browse/SOLR-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607475#action_12607475
]
Ryan McKinley commented on SOLR-536:
------------------------------------
hymmm, after using this for a bit, i'm not sure we should have the utility
funcion:
{code:java}
public <T> List<T> getBeans(Class<T> type)
{code}
in QueryResponse. My problem with it now is that if I use the response in a
context where it needs to be serialized (wicket), then the SolrServer also
needs to get serialized... that is a problem. I think its better to keep that
functionality outside of the QueryResponse class.
> Automatic binding of results to Beans (for solrj)
> -------------------------------------------------
>
> Key: SOLR-536
> URL: https://issues.apache.org/jira/browse/SOLR-536
> Project: Solr
> Issue Type: New Feature
> Components: clients - java
> Affects Versions: 1.3
> Reporter: Noble Paul
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.3
>
> Attachments: SOLR-536.patch, SOLR-536.patch, SOLR-536.patch,
> 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.