I'm Working with Solr 7.4.0 and using DIH Method For Indexing the Data.
Query in data-config.xml.
<entity name="Test" query="Select Names,Test_Value1,Test_Value2,Test_Value3 from TestTable">
<field column="Names" name="Names" splitBy="," />
<field column="Test_*" name="Test_*" splitBy="," />
</entity>
Schema.xml
<field name="Names" type="string" multiValued="true" indexed="true" />
<dynamicField name="Test_*" type="string" multiValued="true" indexed="true" />
After Completing the Indexing, Names easily gets separated as below and showing values as multiValue as required.
e.g
"Names":["Demo1",
"Demo2"]
But When Working With dynamic Field as string type multiValue. Its Showing this result in Indexing.
"Test_Value1":["Test 1, Test 2, Test 3"],
But I need this result as below.
"Test_Value1":["Test 1", "Test 2", "Test 3"],
How would separate the Values of Dynamic Field Values as shown above.
field
definition in DIH can't match multiple fields as far as I know, but the script transformer will allow you to have a regex that matches the input field names and split the string into multiple values if it matches. – TouchwoodNames
field. – Touchwood