使用ES 1.7.2时,术语聚合前20个术语列表包含实际最高值为199时的值,如4639024275540410000。
我想知道这是1.7.2的已知问题,我们应该迁移到新版本吗?
这是违规查询:
GET metrics-2016-04/_search
{
"size": 0,
"query": {
"bool": {
"must": [
{
"match": {
"name": "jvm.thread-states.count"
}
}
]
}
},
"aggs": {
"3": {
"terms": {
"field": "value",
"size": 10
}
}
}
}
结果包含这些巨大的价值:
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 16,
"successful": 16,
"failed": 0
},
"hits": {
"total": 9394,
"max_score": 0,
"hits": []
},
"aggregations": {
"3": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 1511,
"buckets": [
{
"key": 50,
"doc_count": 1376
},
{
"key": 138,
"doc_count": 1344
},
{
"key": 137,
"doc_count": 1299
},
{
"key": 144,
"doc_count": 681
},
{
"key": 143,
"doc_count": 649
},
{
"key": 141,
"doc_count": 611
},
{
"key": 142,
"doc_count": 603
},
{
"key": 4639024275540410000,
"doc_count": 448
},
{
"key": 4632233691727266000,
"doc_count": 445
},
{
"key": 4639059459912499000,
"doc_count": 427
}
]
}
}
}
当我使用范围条件执行常规bool查询以获得最高值时,我得到了一个结果,但绝对没有更高的结果。
查询:
GET metrics-2016-04/_search
{
"size": 10000,
"query": {
"bool": {
"must": [
{
"range": {
"value": {
"gte": 199,
"lte": 1000000000000000000000
}
}
},
{
"match": {
"name": "jvm.thread-states.count"
}
}
]
}
},
"fields": ["value"]
}
结果:
{
"took": 12,
"timed_out": false,
"_shards": {
"total": 16,
"successful": 16,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 5.197636,
"hits": [
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRivuU1roeuo1W0WbLL",
"_score": 5.197636,
"fields": {
"value": [
199
]
}
}
]
}
}
更新:当我执行范围查询以找到这些高值时,我似乎得到大约100的常规较小值:
GET metrics-2016-04/_search
{
"size": 10,
"query": {
"bool": {
"must": [
{
"range": {
"value": {
"gte": 9999999999999999999999999999999
}
}
},
{
"match": {
"name": "jvm.thread-states.count"
}
}
]
}
}
}
响应:
{
"took": 4,
"timed_out": false,
"_shards": {
"total": 16,
"successful": 16,
"failed": 0
},
"hits": {
"total": 9394,
"max_score": 5.206709,
"hits": [
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRhsQLjroeuo1W0WVJG",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T11:04:31.000+0000",
"value": 105
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRhstejroeuo1W0WVLI",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T11:06:31.000+0000",
"value": 104
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRhxScEroeuo1W0WVfb",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T11:26:31.000+0000",
"value": 104
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRh5L9qroeuo1W0WV-S",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T12:01:01.000+0000",
"value": 104,
"instance_name": "mainline"
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRh_mHAroeuo1W0WWat",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T12:29:01.000+0000",
"value": 105,
"instance_name": "mainline"
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRiZMljroeuo1W0WW4h",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T14:20:52.000+0000",
"value": 101,
"instance_name": "HAJNM2110001.local"
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRii6Lfroeuo1W0WXjM",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T15:03:18.000+0000",
"value": 138,
"instance_name": "lx220-itest-mainline-destimo3-s1"
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRij0xcroeuo1W0WXun",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T15:07:18.000+0000",
"value": 138,
"instance_name": "lx220-itest-mainline-destimo3-s1"
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRiknbnroeuo1W0WX4K",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T15:10:46.000+0000",
"value": 50,
"instance_name": "vlx0366-destimo-mainline"
}
},
{
"_index": "metrics-2016-04",
"_type": "gauge",
"_id": "AVRilYAXroeuo1W0WYEd",
"_score": 5.206709,
"_source": {
"name": "jvm.thread-states.count",
"@timestamp": "2016-04-29T15:14:05.000+0000",
"value": 95,
"instance_name": "HAJN72110657"
}
}
]
}
}