如何防止弹性搜索索引中的重复文档插入?

时间:2017-08-27 18:54:44

标签: node.js elasticsearch

是否存在唯一约束,我们可以使用弹性搜索索引来防止重复插入?

我已经探索了很长时间但我无法找到它。

在我的情况下,重复文档被插入到具有不同_id的弹性搜索索引中。

例如 - 在下面的详细信息中,影片索引包含两个具有不同_id的记录。

//evaluates to true if rectOne and rectTwo are colliding
if(rectOneRight > rectTwoLeft && rectOneLeft < rectTwoRight && rectOneBottom > rectTwoTop && rectOneTop < rectTwoBottom){

请帮助任何人。

0 个答案:

没有答案
相关问题