哪些分组将受到“弹性平均”的影响?

时间:2018-10-08 21:45:03

标签: database elasticsearch request

我是Elastic的新手,只想确定我的想法是否正确。 在我的查询中,我添加了两个分组 “ field”:“ statement.actor”,“ field”:“ statement.type”

avg:{"field": "statement.scaled}    

请参阅

"field": "statement.actor"

或到

"field": "statement.type"

查询:

{
  "aggs": {
    "5": {
      "terms": {
        "field": "statement.type",
        "size": 10,
        "order": {
          "_term": "desc"
        },
        "min_doc_count": 1
      },
      "aggs": {
        "3": {
          "terms": {
            "field": "statement.actor",
            "size": 10,
            "order": {
              "_term": "desc"
            },
            "min_doc_count": 1
          },
          "aggs": {
            "1": {
              "avg": {
                "field": "statement.scaled"
              }
            }
          }
        }
      }
    }
  }
}

0 个答案:

没有答案