0
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search, Q, A
client = Elasticsearch(timeout=100)
s = Search(using=client, index="cms*")
s.aggs.bucket('ExitCode', 'terms', field='ExitCode').metric('avgCpuEff', 'avg', field='CpuEff')
for hit in s[0:20].execute():
print hit['ExitCode']
得到幾個的ExitCode = 0。我想到了一個條款鬥應該將所有具有相同的退出代碼,在這種情況下的結果。究竟發生了什麼?