I am using riak nosql database with solr. I know that how to index field in solr with following basic type index int value with suffix _i index String value with suffix _s index long value with suffix _l like this.
Now I want to index List in solr. How can I do it.
The convention for multi-valued fields (i.e. lists) is *_ls for longs, *_ss for Strings, *_fs for floats, etc. For example, if an object's field letters_ss
contains ['A', 'B']
, the object can be found in any of the following ways: letters_ss:A
, letters_ss:B
, or even letters_ss:A AND letters_ss:B
.
Alternatively, you can create a custom schema that would match your datatype and not rely on the naming convention.