Solr 方面计数不正确,如何去重
我们使用两个 solr 来索引文件。有时一篇文章会在两个 solr 中建立索引,因为我们会更新。由于这些重复的文章,导致面计数不正确的问题。如何消除重复计数?
We are using two solrs to index the files. Sometimes one article is indexed in both solrs because we do update. It cause a problem that the facet counts are not correct due to these duplicated articles. How can I de-duplicate the counts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的建议是不要保留重复的文章。因此,您需要一种方法来识别这些重复的文章并将其从一个 SOLR 中删除。
如果您不想删除重复的文章,您仍然需要跟踪它们。
了解 SOLR1 中的哪些文章在 SOLR2 中重复将帮助您消除重复计数,如下所示:
在 SOLR1 中创建一个名为 的额外字段:
当您对 SOLR1 进行查询时添加:IsDuplicatedField=true 到构面。
在这种情况下,方面 IsDuplicateField 将检索所有重复且与您的查询匹配的文章。
祝你好运 !
My advise would be not to keep duplicated articles. So you need a method to identify this duplicates articles and deleted it form one SOLR.
If you don't want to delete duplicate articles you still need to keep track of them.
Knowing which articles from SOLR1 are duplicates in SOLR2 will help you de-duplicate the counts like this:
create an extra field in SOLR1 named :
when you do the query to SOLR1 add: IsDuplicatedField=true to facets.
In this situation the facet IsDuplicateField will retrieve all the articles that are duplicated and match your query.
Good luck !