【发布时间】:2015-07-18 07:40:27
【问题描述】:
请求看起来像:
{
"aggs": {
"contentType": {
"terms": {
"field": "contentType",
"size": 0
}
}
},
"query": {...},
"filter": {...}
}
响应类似于:
{
"took": 300,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 68,
"max_score": 0,
"hits": []
},
"aggregations": {
"contentType": {
"doct_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": 9
"doc_count": 7054
},
{
"key": 9
"doc_count": 7054
},
{
"key": 5
"doc_count": 6236
},
{
"key": 4
"doc_count": 1124
}
]
}
}
}
聚合中的“doc_count”是没有“过滤器”而只有“查询”的结果。 “过滤器”似乎被忽略了。
这在某些时候起作用,但突然之间似乎不起作用。有人知道吗?
Elasticsearch 1.5.2、NEST 1.4.3。
谢谢。
【问题讨论】:
标签: elasticsearch filter nest