# Dev Tools query not working on Discover Query

**URL:** <https://discuss.elastic.co/t/dev-tools-query-not-working-on-discover-query/240900>\
**Category:** Kibana\
**Created:** [July 13, 2020, 7:00am UTC](https://discuss.elastic.co/t/dev-tools-query-not-working-on-discover-query/240900 "2020-07-13T07:00:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![edbautista](https://avatars.discourse-cdn.com/v4/letter/e/edb3f5/32.png) [@edbautista](https://discuss.elastic.co/u/edbautista)\
**Post date:** [July 13, 2020, 7:00am UTC](https://discuss.elastic.co/t/dev-tools-query-not-working-on-discover-query/240900/1 "2020-07-13T07:00:52Z")

</div>

Hi!

Kibana: 7.6.2  
Our team is trying to create a navigation tool on the Kibana dashboard for specific filters. We have made the filters and necessary markdown for the dashboard. However we are stuck with one query that won't work. Most of the filters we made were simple statements like: [statement OR/AND statement]. The last query we need is like this: [(statement 1 AND statement 2) or (statement 3 AND statement 4)]. We have made this work using the Kibana Search Bar and in Dev Tools but it won't work as Query DSL for filter. Here's the query from dev tools:

```auto
{
  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "bool": {
            "should": [
              {
                "bool": {
                  "filter": [
                    {
                      "nested": {
                        "path": "pickups",
                        "query": {
                          "bool": {
                            "should": [
                              {
                                "exists": {
                                  "field": "pickups.arrival"
                                }
                              }
                            ],
                            "minimum_should_match": 1
                          }
                        },
                        "score_mode": "none"
                      }
                    },
                    {
                      "bool": {
                        "must_not": {
                          "nested": {
                            "path": "dropoffs",
                            "query": {
                              "bool": {
                                "should": [
                                  {
                                    "exists": {
                                      "field": "dropoffs.arrival"
                                    }
                                  }
                                ],
                                "minimum_should_match": 1
                              }
                            },
                            "score_mode": "none"
                          }
                        }
                      }
                    }
                  ]
                }
              },
              {
                "bool": {
                  "filter": [
                    {
                      "bool": {
                        "must_not": {
                          "nested": {
                            "path": "pickups",
                            "query": {
                              "bool": {
                                "should": [
                                  {
                                    "exists": {
                                      "field": "pickups.arrival"
                                    }
                                  }
                                ],
                                "minimum_should_match": 1
                              }
                            },
                            "score_mode": "none"
                          }
                        }
                      }
                    },
                    {
                      "nested": {
                        "path": "dropoffs",
                        "query": {
                          "bool": {
                            "should": [
                              {
                                "exists": {
                                  "field": "dropoffs.arrival"
                                }
                              }
                            ],
                            "minimum_should_match": 1
                          }
                        },
                        "score_mode": "none"
                      }
                    }
                  ]
                }
              }
            ],
            "minimum_should_match": 1
          }  
        }
      ]
    }
  }
}

```

Pretty much copied the query from Inspect. Thank you.

---

<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:** [August 10, 2020, 7:00am UTC](https://discuss.elastic.co/t/dev-tools-query-not-working-on-discover-query/240900/2 "2020-08-10T07:00:56Z")

</div>

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