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 Elodie Sannier <el...@kelkoo.fr> on 2014/02/10 16:44:58 UTC
SolrCloud - ResultContext versus SolrDocumentList in distributed
mode
Hello,
I am using SolrCloud 4.5.1 with one shard and three replicas and I am
using the distributed mode.
I am using a custom SearchHandler which makes two sub-queries and merges
the responses.
When I merge the SolrQueryResponse objects I do the following casting :
SolrDocumentList firstResponseSDL = (SolrDocumentList)
firstResponse.getValues().get(Constants.RESPONSE);
SolrDocumentList secondResponseSDL = (SolrDocumentList)
secondResponse.getValues().get(Constants.RESPONSE);
Sometimes (not often), I have a ClassCastException only for the casting
of the second response:
java.lang.ClassCastException: org.apache.solr.response.ResultContext
cannot be cast to org.apache.solr.common.SolrDocumentList
Correct me if I am wrong, but I thought the response type was always
SolrDocumentList in a distibuted mode and ResultContext in a NOT
distibuted mode.
In which case, in a distributed mode, the response of the first
sub-query can be an instance of SolrDocumentList and the second
sub-query an instance of ResultContext ?
Elodie Sannier
Kelkoo SAS
Société par Actions Simplifiée
Au capital de € 4.168.964,30
Siège social : 8, rue du Sentier 75002 Paris
425 093 069 RCS Paris
Ce message et les pièces jointes sont confidentiels et établis à l'attention exclusive de leurs destinataires. Si vous n'êtes pas le destinataire de ce message, merci de le détruire et d'en avertir l'expéditeur.