【发布时间】:2015-10-09 19:27:36
【问题描述】:
以下是我的汇总。
{
"size": 0,
"aggs": {
"cities": {
"terms": {
"field": "city.raw"
}
}
}
映射
"properties": {
"state" : {
"type": "string",
"fields": {
"raw" : {
"type": "string",
"index": "not_analyzed"
}
}
}
效果很好。但它会考虑区分大小写对字段进行分组。
例如。
{
"key": "New York",
"doc_count": 45
},
{
"key": "new york",
"doc_count": 11
},
{
"key": "NEW YORK",
"doc_count": 44
}
我希望结果是这样的
{
"key": "new york",
"doc_count": 100
}
【问题讨论】:
标签: c# elasticsearch lucene aggregation nest