如何修复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进行了一些重复删除但是没有用。
由于
答案 0 :(得分:1)
有两种方法可以处理这个
关于如何在blog中执行这些操作,有大量解释和代码示例。