# Search null value as well other value

**URL:** <https://discuss.elastic.co/t/search-null-value-as-well-other-value/83532>\
**Category:** Elasticsearch\
**Created:** [April 25, 2017, 9:43am UTC](https://discuss.elastic.co/t/search-null-value-as-well-other-value/83532 "2017-04-25T09:43:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Kumar](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Rahul\_Kumar](https://discuss.elastic.co/u/Rahul_Kumar)\
**Post date:** [April 25, 2017, 9:43am UTC](https://discuss.elastic.co/t/search-null-value-as-well-other-value/83532/1 "2017-04-25T09:43:38Z")

</div>

I have a query regarding null search.  
i have a **Set** which have other value as well null value. I want to get all the documents where a particular field is null or have values both. For e. g. i have field named **feedback** which have below possible values,  
feedback=positive,negative and it contain null as well.  
i want to get all those docs where feedback ==null or feedback=positve or feedback=negative.

I'm trying this  
BoolQueryBuilder query = QueryBuilders.boolQuery()  
query.mustNot(new ExistsQueryBuilder(feedback)),  
but m not geting expected data in response.

Thanks in Advance

---

<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:** [May 23, 2017, 9:45am UTC](https://discuss.elastic.co/t/search-null-value-as-well-other-value/83532/2 "2017-05-23T09:45:31Z")

</div>

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