【发布时间】:2015-11-02 00:35:16
【问题描述】:
我在索引中的字段names 中执行术语聚合时得到错误的结果。
以下是我对names字段的映射:
{
"dbnames": {
"properties": {
"names": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
这是我在现场进行简单的terms 聚合得到的结果:
"aggregations": {
"names": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "John Martin",
"doc_count": 1
},
{
"key": "John martin",
"doc_count": 1
},
{
"key": " Victor Moses",
"doc_count": 1
}
]
}
}
如您所见,我有相同的名称,不同的大小写在聚合中显示为不同的存储桶。我在这里想要的是不管情况如何,名字都应该放在一起。
【问题讨论】:
-
他们应该如何分组?在
John Martin或John martin或其他东西下,例如小写的john martin?
标签: elasticsearch