我試圖在elasticsearch中獲得所有不同的字段值,但我只得到10個桶。elasticsearch不同的查詢只返回10個桶
設置我的查詢是這樣的:
GET /sdpjmx/kafkajmx/_search
{
"size": 0,
"aggs" : {
"topics" : {
"terms" : { "field" : "kafka_topic" }
}
}}
甚至與size
設置爲0,我仍然只能得到10回。
結果在此:
{
"took": 11,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"failed": 0
},
"hits": {
"total": 948380,
"max_score": 0,
"hits": []
},
"aggregations": {
"topics": {
"doc_count_error_upper_bound": 3597,
"sum_other_doc_count": 886819,
"buckets": [
{
"key": "__consumer_offsets",
"doc_count": 10777
},
{
"key": "EVENT_ONE",
"doc_count": 4367
},
{
"key": "ERROR_AUTH",
"doc_count": 4365
},
{
"key": "topic zds",
"doc_count": 4364
},
{
"key": "topicabs",
"doc_count": 4360
},
{
"key": "dynamictopic1",
"doc_count": 3827
},
{
"key": "connect-a",
"doc_count": 3824
},
{
"key": "topic12",
"doc_count": 3820
},
{
"key": "service_qa",
"doc_count": 3820
},
{
"key": "topic ad",
"doc_count": 3819
}
]
}
}
}