I'm have a solr schema with dynamic field of different types in. Eg in the schema.xml there are:
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
<dynamicField name="*_i" type="int" indexed="true" stored="true"/>
<dynamicField name="*_l" type="long" indexed="true" stored="true"/>
<dynamicField name="*_f" type="float" indexed="true" stored="true"/>
<dynamicField name="*_d" type="double" indexed="true" stored="true"/>
And I want to access these field using a SolrJ annotated POJO. I know I can have different Map references for each data type in the POJO like this:
...
@Field("*_s")
public Map<String, String> strings;
@Field("*_i")
public Map<String, Integer> integers;
...
But is it possible to have all dynamic fields stored in the same map? I was thinking something like:
...
@Field("*_s")
@Field("*_i")
public Map<String, Object> dynamicFields;
...
The only documentation I can find about SolrJ, POJOs and dynamic fields is an old feature request: https://issues.apache.org/jira/browse/SOLR-1129