# Query DSL in Kibana search bar

**URL:** <https://discuss.elastic.co/t/query-dsl-in-kibana-search-bar/32777>\
**Category:** Kibana\
**Created:** [October 22, 2015, 2:31pm UTC](https://discuss.elastic.co/t/query-dsl-in-kibana-search-bar/32777 "2015-10-22T14:31:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucyy](https://avatars.discourse-cdn.com/v4/letter/l/cc9497/32.png) [@lucyy](https://discuss.elastic.co/u/lucyy)\
**Post date:** [October 22, 2015, 2:31pm UTC](https://discuss.elastic.co/t/query-dsl-in-kibana-search-bar/32777/1 "2015-10-22T14:31:14Z")

</div>

I want to use Query DSL in Kibana search bar so I could make more completed search. I tried the following a simple query in the search bar, but I got an error 'No query registered for [query]'. These codes work well in Marvel.

{"query": {"filtered": {"query": {"match\_phrase": {"text": "sore throat"}}}}}

Could anyone let me know how to use Query DSL in the search bar of Kibana?

Thanks you!

---

<div class="post-metadata">

**Author:** ![Pieter\_Agenbag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pieter_agenbag/32/4562_2.png) [@Pieter\_Agenbag](https://discuss.elastic.co/u/Pieter_Agenbag)\
**Post date:** [October 27, 2015, 12:44pm UTC](https://discuss.elastic.co/t/query-dsl-in-kibana-search-bar/32777/2 "2015-10-27T12:44:40Z")

</div>

Try something like this maybe ?

```
{"constantScore" : {"filter" : {"query" : {"query_string" : {"query" : "sore throat"}}}}}
```

---

<div class="post-metadata">

**Author:** ![lucyy](https://avatars.discourse-cdn.com/v4/letter/l/cc9497/32.png) [@lucyy](https://discuss.elastic.co/u/lucyy)\
**Post date:** [October 27, 2015, 1:06pm UTC](https://discuss.elastic.co/t/query-dsl-in-kibana-search-bar/32777/3 "2015-10-27T13:06:24Z")

</div>

Thank you Pieter, this code works. Could you please let me know the reason? Thanks.

---

<div class="post-metadata">

**Author:** ![Pieter\_Agenbag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pieter_agenbag/32/4562_2.png) [@Pieter\_Agenbag](https://discuss.elastic.co/u/Pieter_Agenbag)\
**Post date:** [October 27, 2015, 2:11pm UTC](https://discuss.elastic.co/t/query-dsl-in-kibana-search-bar/32777/4 "2015-10-27T14:11:17Z")

</div>

Glad I could help. To be honest , I just happened to have the constantscore example close by... and posted it as a working query DSL example.  
In reviewing your question and my answer , I think you might find that my 'answer' is not exactly correct.

Essentially its just going to execute a querystring query which is exactly the same as putting "sore throat" straight into the search bar.

Your problem I think is simply syntax - "query" is not a valid dsl root node for [Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html)

You could have simply phrased it as

```
{"match_phrase":{"text":"sore throat"}}

```

---

<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:** [July 6, 2017, 2:10pm UTC](https://discuss.elastic.co/t/query-dsl-in-kibana-search-bar/32777/5 "2017-07-06T14:10:35Z")

</div>


