# Canvas - How to do a nested Query?

**URL:** <https://discuss.elastic.co/t/canvas-how-to-do-a-nested-query/175430>\
**Category:** Kibana\
**Created:** [April 4, 2019, 1:47pm UTC](https://discuss.elastic.co/t/canvas-how-to-do-a-nested-query/175430 "2019-04-04T13:47:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkusP](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@MarkusP](https://discuss.elastic.co/u/MarkusP)\
**Post date:** [April 4, 2019, 1:47pm UTC](https://discuss.elastic.co/t/canvas-how-to-do-a-nested-query/175430/1 "2019-04-04T13:47:13Z")

</div>

Hi there,

I have in the ES 6.7 stack an index with a nested mapping an use a nested query in dashboards and queries

```
GET /client/_search
{
  "query": {
    "nested": {
      "path": "params",
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "params.paramname": "namePlaceholder"
              }
            },
            {
              "match": {
                "params.value": "false"
              }
            }
          ],
          "must_not": [
            {
              "match": {
                "params.value": "CLIENTTYPE_SPARE"
              }
            },
            {
              "match": {
                "params.value": "CLIENTTYPE_HTML"
              }
            }
          ]
        }
      }
    }
  }
}

```

I tried to do something similiar in canvas using esql but i failed, because i found no solution like the nested query [https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html)

Then I tied to use the QUERY function in the where part of the sql, but that is not supported.

Is there something i can do in the expression builder to solve this problem or anything else?

I think i could solve some of my issues in logstash by generating additional fields (derived property ) but this isn t possible for all my issues.

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [April 4, 2019, 8:34pm UTC](https://discuss.elastic.co/t/canvas-how-to-do-a-nested-query/175430/2 "2019-04-04T20:34:27Z")

</div>

@MarkusP

this is not possible in Canvas right now. I would log an ER [https://github.com/elastic/kibana/issues/new/choose](https://github.com/elastic/kibana/issues/new/choose)

---

<div class="post-metadata">

**Author:** ![MarkusP](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@MarkusP](https://discuss.elastic.co/u/MarkusP)\
**Post date:** [April 5, 2019, 7:20am UTC](https://discuss.elastic.co/t/canvas-how-to-do-a-nested-query/175430/3 "2019-04-05T07:20:30Z")

</div>

@thomasneirynck Thank you for the information.  
I created an RFE [https://github.com/elastic/kibana/issues/34607](https://github.com/elastic/kibana/issues/34607) as you suggested.

---

<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:** [May 3, 2019, 7:22am UTC](https://discuss.elastic.co/t/canvas-how-to-do-a-nested-query/175430/4 "2019-05-03T07:22:33Z")

</div>

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