Description
In class DocumentObjectBinder.java, when jnject a value from doc to bean class, seems it only support List and Map, and not support Set. In Cassandra the collection types includes "set" which Cassandra Java Driver treat it as LinkedHashSet.
I have a column defined type set<test>. And in the Java Pojo, I set it as Set<String>.
It will success in Cassandra binding, but fail in Solr with following error:
Caused by: java.lang.IllegalArgumentException: Can not set java.util.Set field com.xxx.xxxx to java.util.ArrayList
But If I set it Pojo to List<String>, Solr binding will success, but Cassandra will fail and give me error as bellow:
argument type mismatch - had objects of type "java.util.LinkedHashSet" but expected signature "java.util.List"
I believe following code may need an update? Which only care about List and Map.
<T> void inject(T obj, SolrDocument sdoc) {
Object val = getFieldValue(sdoc);
if(val == null)
if (isArray && !isContainedInMap) {
List list;
if (val.getClass().isArray())
else if (val instanceof List)
{ list = (List) val; }else
{ list = new ArrayList(); list.add(val); } set(obj, list.toArray((Object[]) Array.newInstance(type, list.size())));
} else if (isList && !isContainedInMap) {
if (!(val instanceof List))
set(obj, val);
} else if (isContainedInMap) {
if (val instanceof Map)
} else
{ set(obj, val); }}