elasticsearch 学习
聚合查询 cardinalityValue 值怎那么会大于整个索引的docCount?
{
"size": 1,
"query": {
"bool": {
"must": [{
"term": {
"caseId": {
"value": "1765668436492517378",
"boost": 1.0
}
}
}, {
"bool": {
"adjust_pure_negative": true,
"boost": 1.0
}
}],
"adjust_pure_negative": true,
"boost": 1.0
}
},
"aggregations": {
"by_index": {
"terms": {
"field": "_index",
"size": 10,
"min_doc_count": 1,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [{
"_count": "desc"
}, {
"_key": "asc"
}]
},
"aggregations": {
"total_hits": {
"cardinality": {
"field": "_id"
}
}
}
}
}
}