# Strict comparison

**URL:** <https://discuss.elastic.co/t/strict-comparison/250550>\
**Category:** Kibana\
**Tags:** kql-kibana-query-language\
**Created:** [September 30, 2020, 5:11pm UTC](https://discuss.elastic.co/t/strict-comparison/250550 "2020-09-30T17:11:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcuvi](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@pcuvi](https://discuss.elastic.co/u/pcuvi)\
**Post date:** [September 30, 2020, 5:11pm UTC](https://discuss.elastic.co/t/strict-comparison/250550/1 "2020-09-30T17:11:45Z")

</div>

Hello all,  
I want to find a document where "data.city:Barcelona". Thus, the query should return the doc 2 but not doc 1. How can I do it? Currently, I am doing a Lucene query on Kibana using "data.city:Barcelona" and it returns both documents.  
Thanks!

1. 

{data.city:[Lisboa, Munich, Barcelona]}

1. 

{data.city:Barcelona}

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [October 1, 2020, 12:33am UTC](https://discuss.elastic.co/t/strict-comparison/250550/2 "2020-10-01T00:33:00Z")

</div>

Hello,

Which version of the stack you are on? We have KQL too and it does help to get specific results depending on your mapping.

> **[Kibana Query Language | Kibana Guide \[7.9\] | Elastic](https://www.elastic.co/guide/en/kibana/current/kuery-query.html)**

if you could post your version of the stack and what is the mapping on your field - we should be able to narrow it down. Oh and also the Lucene query which you are using.

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![pcuvi](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@pcuvi](https://discuss.elastic.co/u/pcuvi)\
**Post date:** [October 1, 2020, 5:46pm UTC](https://discuss.elastic.co/t/strict-comparison/250550/4 "2020-10-01T17:46:50Z")

</div>

It worked using:  
NOT data.city:/~(Barcelona)/  
Cheers

---

<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:** [October 29, 2020, 5:47pm UTC](https://discuss.elastic.co/t/strict-comparison/250550/5 "2020-10-29T17:47:00Z")

</div>

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