Removing Solr duplicate values into multivalued field

后端 未结 7 1104
情书的邮戳
情书的邮戳 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:55

    You would need to handle it on the Client side to remove the duplicate values.

    You can customize the implementation like RemoveDuplicatesTokenFilterFactory (works for same text at same position) to filter out the tokens. Write an extension basically. OR

    Also, If using the multivalued field for just faceting ,the value in faceted field is counted just once. So even if you add multiple same values, that would be reflected as a single value in the facet count entry. Have tested this. you too can confirm.

    However, the duplicate values would cause the change in the lengthNorm and hence can have an effect on the scoring.

提交回复
热议问题