# How to remove fields with blank values in lucense query

**URL:** <https://discuss.elastic.co/t/how-to-remove-fields-with-blank-values-in-lucense-query/124804>\
**Category:** Kibana\
**Created:** [March 20, 2018, 3:16pm UTC](https://discuss.elastic.co/t/how-to-remove-fields-with-blank-values-in-lucense-query/124804 "2018-03-20T15:16:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shailesh\_Vaidya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shailesh_vaidya/32/24144_2.png) [@Shailesh\_Vaidya](https://discuss.elastic.co/u/Shailesh_Vaidya)\
**Post date:** [March 20, 2018, 3:16pm UTC](https://discuss.elastic.co/t/how-to-remove-fields-with-blank-values-in-lucense-query/124804/1 "2018-03-20T15:16:37Z")

</div>

Hello,

I want to create search with only non blank fields. I tried with \_exists but it did not help. Can anyone please help it out.

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [March 20, 2018, 4:09pm UTC](https://discuss.elastic.co/t/how-to-remove-fields-with-blank-values-in-lucense-query/124804/2 "2018-03-20T16:09:20Z")

</div>

It should work, if you either use the "add Filter" in the filter bar to create an exists query or write a query: `_exists_:fieldname`. If that doesn't work, could you provide some more information, like a screenshot of your query and a screenshot of a document, that you would expect to match that query?

Cheers,  
Tim

---

<div class="post-metadata">

**Author:** ![Shailesh\_Vaidya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shailesh_vaidya/32/24144_2.png) [@Shailesh\_Vaidya](https://discuss.elastic.co/u/Shailesh_Vaidya)\
**Post date:** [March 23, 2018, 8:42pm UTC](https://discuss.elastic.co/t/how-to-remove-fields-with-blank-values-in-lucense-query/124804/3 "2018-03-23T20:42:54Z")

</div>

Hi Tim,

Thanks for reply. Unfortunately I am not able to share screenshot outside my private network due to network firewall rules and policies. I will try to replicate scenario in my personal laptop and update 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:** [April 20, 2018, 8:42pm UTC](https://discuss.elastic.co/t/how-to-remove-fields-with-blank-values-in-lucense-query/124804/4 "2018-04-20T20:42:54Z")

</div>

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