We use the built-in solr instance for Java SolrJ.
I want to add a multi-valued field to the document. A multi-valued field is a coma divided by lines.
In Java, I want:
solrInputDocument.addField(Field1, "value1,value2,value3");
The definition for field 1 in the diagram is as follows
<field name="Field1" type="multiValuedField" indexed="true" stored="true" multiValued="true" required="false"/>
<fieldType name="multiValuedField" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.ClassicTokenizerFactory"/>
</analyzer>
</fieldType>
With this configuration, we expected that when calling the addField method, Solr was able to verify that it was multiValuedField, and therefore it would convert String to an arrayList with different values.
Instead, we get an arraylist with a single value, which is actually the original string added to the document.
Question: should the tokenizer take care of this, or should we do it ourselves when we add multi-valued fields to the document?
Thanks.
Sal81