Removing Solr duplicate values into multivalued field

后端 未结 7 1058
情书的邮戳
情书的邮戳 2021-02-19 03:13

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

7条回答
  •  梦谈多话
    2021-02-19 03:37

    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.

提交回复
热议问题