按子聚合计数弹性搜索排序

时间:2017-03-28 08:33:09

标签: elasticsearch

您好我有以下查询

 "aggregations": {
      "catalogid-and-terms": {
         "terms": {
            "field": "catalog_id",
            "size":3,
            "order": {
               "keywords>_count": "desc"  <-- HERE IS THE PROBLEM
            }
         },
         "aggregations": {
            "keywords": {
               "terms": {
                  "field": "keywords",
                  "size":1,
                  "order": {
                     "_count": "desc"
                  },
                  "include": {
                     "pattern": "mi.*"
                  }
               }
            }
         }
      }

所以我试图获取目录中的顶级关键字,但我想按关键字的数量排序。我该怎么做?

0 个答案:

没有答案