# Weird query behavior - boolean

**URL:** <https://discuss.elastic.co/t/weird-query-behavior-boolean/13313>\
**Category:** Elasticsearch\
**Created:** [August 23, 2013, 1:53pm UTC](https://discuss.elastic.co/t/weird-query-behavior-boolean/13313 "2013-08-23T13:53:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liron\_Cohen](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@Liron\_Cohen](https://discuss.elastic.co/u/Liron_Cohen)\
**Post date:** [August 23, 2013, 1:53pm UTC](https://discuss.elastic.co/t/weird-query-behavior-boolean/13313/1 "2013-08-23T13:53:06Z")

</div>

Hello,

I'm VERY new to ES.

I indexed some documents (Type=Location) that has a boolean field named:  
isAbroad.  
the mapping looks like this:  
"isAbroad": {"type": "boolean"}  
I have documents for both true and false for that field in ES.  
Where I query:  
{  
"query": {  
"term": {  
"isAbroad": true  
}  
}  
}  
I get valid results (13 hits).

but when I run:  
{  
"query": {  
"term": {  
"isAbroad": false  
}  
}  
}  
I get 0 hits.

Any ideas?

Thanks,  
Liron

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Liron\_Cohen](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@Liron\_Cohen](https://discuss.elastic.co/u/Liron_Cohen)\
**Post date:** [August 23, 2013, 2:07pm UTC](https://discuss.elastic.co/t/weird-query-behavior-boolean/13313/2 "2013-08-23T14:07:10Z")

</div>

Please disregard the question.  
(stupid newbie mistake)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:19am UTC](https://discuss.elastic.co/t/weird-query-behavior-boolean/13313/3 "2017-07-06T02:19:58Z")

</div>


