# Kibana Query - match and not eixsts on same field in a single query

**URL:** <https://discuss.elastic.co/t/kibana-query-match-and-not-eixsts-on-same-field-in-a-single-query/215765>\
**Category:** Elasticsearch\
**Created:** [January 20, 2020, 3:32pm UTC](https://discuss.elastic.co/t/kibana-query-match-and-not-eixsts-on-same-field-in-a-single-query/215765 "2020-01-20T15:32:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 21, 2020, 6:23am UTC](https://discuss.elastic.co/t/kibana-query-match-and-not-eixsts-on-same-field-in-a-single-query/215765/4 "2020-01-21T06:23:38Z")

</div>

Please don't post unformatted code, logs, or configuration as it's very hard to read.

Instead, paste the text and format it with \</\> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

There is an example on how to write a Term Query in the documentation: [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html)

You need to fix that part.

If you still can't find the way to write it, could you provide **a full** recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

_[View the full topic](https://discuss.elastic.co/t/kibana-query-match-and-not-eixsts-on-same-field-in-a-single-query/215765)._
