You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Catala, Francois" <Fr...@nuance.com> on 2015/06/19 15:15:46 UTC

SolrJ: getBeans with multiple document types in response

Hello,

I'm trying to parse Solr Responses with SolrJ,  but the responses contain mixed types : for example 'song' documents and 'movie' documents with different fields.
The getBeans method takes 1 class type as input parameter, this does not allow for mixed document types responses.
What would be the best approach to parse the response and to get a list of 'entity' (the super class).

I'm about to write another implementation of the DocumentObjectBinder class but I'd like to avoid that.

Thanks!!

François Catala
Software Developer
NUANCE COMMUNICATIONS, INC.
1500 University, Suite 557
Montréal QC  H3A 3S7
514 904 7800   Office"just say my name" or ext. 2345