如何解决Elasticsearch结果中的重复问题?还是我们可以用JavaScript删除这样的重复编码?
"hits": [
{
"_index": "yourservice",
"_type": "categories",
"_id": "AVGbSNBXiBkfr-xhHUl8",
"_score": 0.40062606,
"_timestamp": 1450009219159,
"_source": {
"name": "Home Theater "
}
},
{
"_index": "yourservice",
"_type": "categories",
"_id": "AVGbR7mdiBkfr-xhHUY2",
"_score": 0.38263628,
"_timestamp": 1450009147805,
"_source": {
"name": "Home Theater "
}
},
{
"_index": "yourservice",
"_type": "categories",
"_id": "AVGbSNBXiBkfr-xhHUo-",
"_score": 0.33147845,
"_timestamp": 1450009219159,
"_source": {
"name": "Landscape, Yard & Garden"
}
}
]
}
我已经看到一些使用elasticsearcg aggs的重复删除,但是没有用。
谢谢
最佳答案
有两种方法可以解决此问题
在blog中,有很多有关如何执行这些操作的解释和代码示例。
关于javascript - Elasticsearch显示重复的点击,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34251084/