solr去重
2024-4-5 01:16:52 Author: www.yanglong.pro(查看原文) 阅读量:5 收藏

配置文件:solrconfig.xml

<requestHandler name="/update" class="solr.UpdateRequestHandler" >
  <lst name="defaults">
    <str name="update.chain">dedupe</str>
  </lst>
</requestHandler>

<updateRequestProcessorChain name="dedupe">
  <processor class="solr.processor.SignatureUpdateProcessorFactory">
    <bool name="enabled">true</bool>
    <str name="signatureField">id</str>
    <bool name="overwriteDupes">true</bool>
    <str name="fields">object_id,object_type</str>
    <str name="signatureClass">solr.processor.Lookup3Signature</str>
  </processor>
  <processor class="solr.LogUpdateProcessorFactory" />
  <processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>

修改fields字段为需要去重的字段


文章来源: https://www.yanglong.pro/solr%e5%8e%bb%e9%87%8d/
如有侵权请联系:admin#unsafe.sh