Unable to run Query in Kibana DSL

Hi Team,

There is an aggregation query which I ran in the Kibana "Dev Tools"(PFB) but failing to run in the kibana Discover page (query)

Query

{
  "size": 100, 
  "aggs": {
    "group_by_pull_request": {
      "terms": {
        "field": "pull_request.url.keyword"
      }, "aggs": {
        "group_by_actions": {
          "terms": {
            "field": "action.keyword",
            "size": 10
          }, "aggs": {
            "group_by_events": {
              "terms": {
                "field": "headers.x_github_event.keyword",
                "size": 100
              }
            }
          }
        }
      }
    }
  }
}

To be noted that this query is working in elasticsearch where as when I tried to make this one work in the Kibana Dashboard in "Edit DSL Query"

I am getting several errors as such below

Error #1

parsing_exception
[size] query malformed, no start_object after query name

Error: Bad Request
    at Fetch._callee3$ (http://10.118.237.74/36136/bundles/core/core.entry.js:6:59535)
    at l (http://10.118.237.74/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:982071)
    at Generator._invoke (http://10.118.237.74/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:981824)
    at Generator.forEach.e.<computed> [as next] (http://10.118.237.74/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:982428)
    at fetch_asyncGeneratorStep (http://10.118.237.74/36136/bundles/core/core.entry.js:6:52652)
    at _next (http://10.118.237.74/36136/bundles/core/core.entry.js:6:52968)

The second error which I received after removing Size.

Error #2

parsing_exception
[size] query malformed, no start_object after query name

Error: Bad Request
    at Fetch._callee3$ (http://10.118.237.74/36136/bundles/core/core.entry.js:6:59535)
    at l (http://10.118.237.74/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:982071)
    at Generator._invoke (http://10.118.237.74/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:981824)
    at Generator.forEach.e.<computed> [as next] (http://10.118.237.74/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:982428)
    at fetch_asyncGeneratorStep (http://10.118.237.74/36136/bundles/core/core.entry.js:6:52652)
    at _next (http://10.118.237.74/36136/bundles/core/core.entry.js:6:52968)

I am sure I am missing a small changes which needs to be added to the query in order for it to pass to the Kibana.

Regards
TJ

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.