I tried the solutions listed in the below question.
Removing Solr duplicate values into multivalued field
I'm using dataimport handler and creating multiple values for the field using RegexTransformer.
My sql returns this for column FOO
Johnny Cash, Bonnie Money, Honey Bunny, Johnny Cash
and I store it to the multivalued field foo using splitBy=","
<field column="FOO" name="foo" splitBy=","/>
and it's stored in the multivalued field as such
{"Johnny Cash", "Bonnie Money", "Honey Bunny", "Johnny Cash"}
I've added this to the solrconfig xml
<updateRequestProcessorChain name="distinctMultiValued" default="true">
<!-- To remove duplicate values in a multivalued field-->
<processor class="DistributedUpdateProcessorFactory"/>
<processor class="UniqFieldsUpdateProcessorFactory">
<str name="fieldRegex">foo</str>
</processor>
<processor class="solr.LogUpdateProcessorFactory" />
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>
I've also tried fieldName in place of fieldRegex and tried *oo instead of foo, but the duplicates remain.
Does this have something to do with the RegexTransformer?
I also have an update chain with TrimFieldsUpdateProcessorFactory
than runs without any issues.