I am trying to run a solr query using solrj against a cassandra table that has a collection that is a java.util.Set
.
When my results come back I get an exception when trying to use the getBeans
method of the solr document:
java.lang.IllegalArgumentException: Can not set java.util.Set field com.mycompany.entities.MyEntity.groupId to java.util.ArrayList
Basic query code:
QueryResponse results = getSolrServer().query(query);
SolrDocumentList documentList = results.getResults();
List<MyEntity> results = results.getBeans(MyEntity.class);
My entity:
public class MyEntity{
@Field
Set<String> groupId;
}
Has anyone had success using a Set
and storing it to be retrieved through solr and if so how have you got it to work with solrj?