# Boolean filter query being ignored (maybe)

**URL:** <https://discuss.elastic.co/t/boolean-filter-query-being-ignored-maybe/104457>\
**Category:** Elasticsearch\
**Created:** [October 18, 2017, 9:05pm UTC](https://discuss.elastic.co/t/boolean-filter-query-being-ignored-maybe/104457 "2017-10-18T21:05:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emarthinsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emarthinsen/32/23172_2.png) [@emarthinsen](https://discuss.elastic.co/u/emarthinsen)\
**Post date:** [October 18, 2017, 9:05pm UTC](https://discuss.elastic.co/t/boolean-filter-query-being-ignored-maybe/104457/1 "2017-10-18T21:05:21Z")

</div>

Hi. I'm trying to filter my search results on a boolean property. I set up a term filter where the value of the "build" property should be true (the literal value). I'm getting a result in my results where the value is not true. Is is an empty string. Here's a Gist that shows my index mapping, the query I'm issuing, and the results that I'm getting back. The result that starts on line 128 is the one that I'm not expecting to be there:

> <https://gist.github.com/emarthinsen/fc5dbdcb69de6ab8f1380dfe82cf51ca>

On a side note, I also don't know why that value is an empty string. The values that we are feeding into our bulk indexing operation always uses literal true and false values. I'm not sure if this is significant to the issue above though.

---

<div class="post-metadata">

**Author:** ![emarthinsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emarthinsen/32/23172_2.png) [@emarthinsen](https://discuss.elastic.co/u/emarthinsen)\
**Post date:** [October 18, 2017, 9:39pm UTC](https://discuss.elastic.co/t/boolean-filter-query-being-ignored-maybe/104457/2 "2017-10-18T21:39:48Z")

</div>

I figured it out. We were actually ending up with 0 or 1 as true and false. Fixing the data we send in should resolve the problem.

---

<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:** [November 15, 2017, 9:40pm UTC](https://discuss.elastic.co/t/boolean-filter-query-being-ignored-maybe/104457/3 "2017-11-15T21:40:16Z")

</div>

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