我有以下查询
当我运行此查询时, 输出包含所有中间my_huge_bucket.my_huge_bucket_metric结果,但我只对sum_bucket指标感兴趣。
有没有办法从结果中删除中间聚合?
/* combo search box */
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
form {
margin:50px auto;
}
.form-wrap {
display: inline;
font-size:0; /* whitespace remover */
}
form > * {
vertical-align: middle;
height: 50px;
}
.search-box {
width:150px;
background:rgba(50, 50, 50, 0.2);
border:2px solid #8FD926;
font-size: 28px;
display: inline-block;
}
.search-button {
position:relative;
border:2px solid #8FD926;
background-color:#8FD926;
color:#fafafa;
font-size: 28px;
display: inline-block;
}
.search-button:hover {
background-color:#fafafa;
color:#8FD926;
}
select {
width:120px;
background:rgba(50, 50, 50, 0.2) url({% static 'images/caret.png' %}) no-repeat right center;;
border:2px solid #8FD926;
font-size: 12px;
-webkit-appearance: none;
-webkit-border-radius: 0px;
display: inline-block;
}
答案 0 :(得分:1)
刚刚发现了filter_path选项 这正是我正在寻找的
https://www.elastic.co/guide/en/elasticsearch/reference/2.3/common-options.html#_response_filtering