# Unable to run Query in Kibana DSL

**URL:** <https://discuss.elastic.co/t/unable-to-run-query-in-kibana-dsl/261746>\
**Category:** Elasticsearch\
**Created:** [January 21, 2021, 8:34am UTC](https://discuss.elastic.co/t/unable-to-run-query-in-kibana-dsl/261746 "2021-01-21T08:34:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamilarasanbravo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamilarasanbravo/32/62962_2.png) [@tamilarasanbravo](https://discuss.elastic.co/u/tamilarasanbravo)\
**Post date:** [January 21, 2021, 8:34am UTC](https://discuss.elastic.co/t/unable-to-run-query-in-kibana-dsl/261746/1 "2021-01-21T08:34:17Z")

</div>

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

```auto
{
  "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

```auto
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

```auto
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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 18, 2021, 8:34am UTC](https://discuss.elastic.co/t/unable-to-run-query-in-kibana-dsl/261746/2 "2021-02-18T08:34:35Z")

</div>

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