# Best way to deal with empty fields?

**URL:** <https://discuss.elastic.co/t/best-way-to-deal-with-empty-fields/364806>\
**Category:** Kibana\
**Tags:** search\
**Created:** [August 12, 2024, 10:25pm UTC](https://discuss.elastic.co/t/best-way-to-deal-with-empty-fields/364806 "2024-08-12T22:25:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikg](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@erikg](https://discuss.elastic.co/u/erikg)\
**Post date:** [August 12, 2024, 10:25pm UTC](https://discuss.elastic.co/t/best-way-to-deal-with-empty-fields/364806/1 "2024-08-12T22:25:04Z")

</div>

Hello,

I have a field that seems to come in as "--" so I removed it.  
The due to removing it, the field now its "(empty)".

**The issue I want to filter out these fields but both appear:**  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/c/0c2ed611cf5a5a09300d2cc0bdb697d4e78c1e46.png)

**I even did "exists" and they both still appear:**

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/1/11f1f65bbc396fde8da4d719cab555b411156248.png)

what is the best approach to ensure that the filters work?

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [August 13, 2024, 3:35am UTC](https://discuss.elastic.co/t/best-way-to-deal-with-empty-fields/364806/2 "2024-08-13T03:35:10Z")

</div>

Hi @erikg , what happens whe you try :  
NOT field\_test.keyword: "--" and NOT field\_test : \*

---

<div class="post-metadata">

**Author:** ![erikg](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@erikg](https://discuss.elastic.co/u/erikg)\
**Post date:** [August 13, 2024, 7:11pm UTC](https://discuss.elastic.co/t/best-way-to-deal-with-empty-fields/364806/3 "2024-08-13T19:11:17Z")

</div>

> [@Alex\_Salgado-Elastic](#):
>
> OT field\_test : \*

Hey @Alex_Salgado-Elastic  
No results appear using your query:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/5/a5246d21c6f7cae62968d5a0d22a4bd4a025926c.png)

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [August 14, 2024, 6:58pm UTC](https://discuss.elastic.co/t/best-way-to-deal-with-empty-fields/364806/4 "2024-08-14T18:58:06Z")

</div>

Hello @erikg , just to clarify.  
What was the expected outcome? Can you provide an example?

---

<div class="post-metadata">

**Author:** ![erikg](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@erikg](https://discuss.elastic.co/u/erikg)\
**Post date:** [August 14, 2024, 10:07pm UTC](https://discuss.elastic.co/t/best-way-to-deal-with-empty-fields/364806/5 "2024-08-14T22:07:42Z")

</div>

Hello @Alex_Salgado-Elastic ,

The expected outcome is to possible filter out empty and "--" fields.

In my example: I have actual values for "nextcloud.user" field (if you look at the very bottom row of the pictures). I just seem to have empty or null fields that are not filtering out.

I believe this might be a bug.
