My Solr index contains a multivalued field with duplicate values. How can I remove the duplicates ?
Is it possible to overwrite duplicate values into the multivalued fie
Really late to the party, but the top answer did not work for me in Solr 6.0 for attempting to add a duplicate entry on a multivalued field. it was missing a processor right before UniqFieldsUpdateProcessorFactory
. So adding something like this to my solrconfig.xml worked:
YourFieldA
yourFieldB
Where YourFieldA and YourFieldB are defined fields in your schema.xml. Note that you must also add this to the proper requestHandler
ie:
uniq-fields
This will not only prevent duplicates from being added, but also remove all duplicates from your index upon update for the specified fields.