<p dir="auto">It seems that I'm unable to make elasticsearch query for boolean true values. Boolean false works fine.</p>
<p dir="auto">Elasticsearch version: 0.20.1</p>
<p dir="auto">Steps to reproduce (in shell script form):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XDELETE http://localhost:9200/rctest
echo
curl -XPOST http://localhost:9200/rctest/attendants/123 -d '{&quot;is_cool&quot;:true}'
echo
curl -XPOST http://localhost:9200/rctest/attendants/321 -d '{&quot;is_cool&quot;:false}'
echo
echo &quot;*** REFRESH&quot;
curl -XPOST http://localhost:9200/rctest/_refresh
echo
echo &quot;*** All documents&quot;
curl -XGET http://localhost:9200/rctest/attendants/_search
echo
echo &quot;*** Result of query A&quot;
curl -XGET http://localhost:9200/rctest/attendants/_search -d '{&quot;query&quot;:{&quot;term&quot;:{&quot;is_cool&quot;:true}}}'
echo
echo &quot;*** Result of Query A as query params&quot;
curl -XGET &quot;http://localhost:9200/rctest/_search?q=is_cool:true&quot;
echo
echo &quot;*** REFRESH&quot;
curl -XPOST http://localhost:9200/rctest/_refresh
echo
echo &quot;*** All documents&quot;
curl -XGET http://localhost:9200/rctest/attendants/_search
echo
echo &quot;*** Result of query B&quot;
curl -XGET http://localhost:9200/rctest/attendants/_search -d '{&quot;query&quot;:{&quot;term&quot;:{&quot;is_cool&quot;:false}}}'
echo
echo &quot;*** Result of Query B as query params&quot;
curl -XGET &quot;http://localhost:9200/rctest/_search?q=is_cool:false&quot;
echo"><pre class="notranslate"><code class="notranslate">curl -XDELETE http://localhost:9200/rctest
echo
curl -XPOST http://localhost:9200/rctest/attendants/123 -d '{"is_cool":true}'
echo
curl -XPOST http://localhost:9200/rctest/attendants/321 -d '{"is_cool":false}'
echo
echo "*** REFRESH"
curl -XPOST http://localhost:9200/rctest/_refresh
echo
echo "*** All documents"
curl -XGET http://localhost:9200/rctest/attendants/_search
echo
echo "*** Result of query A"
curl -XGET http://localhost:9200/rctest/attendants/_search -d '{"query":{"term":{"is_cool":true}}}'
echo
echo "*** Result of Query A as query params"
curl -XGET "http://localhost:9200/rctest/_search?q=is_cool:true"
echo
echo "*** REFRESH"
curl -XPOST http://localhost:9200/rctest/_refresh
echo
echo "*** All documents"
curl -XGET http://localhost:9200/rctest/attendants/_search
echo
echo "*** Result of query B"
curl -XGET http://localhost:9200/rctest/attendants/_search -d '{"query":{"term":{"is_cool":false}}}'
echo
echo "*** Result of Query B as query params"
curl -XGET "http://localhost:9200/rctest/_search?q=is_cool:false"
echo
</code></pre></div>
<p dir="auto">Output of that shell script:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{&quot;ok&quot;:true,&quot;acknowledged&quot;:true}
{&quot;ok&quot;:true,&quot;_index&quot;:&quot;rctest&quot;,&quot;_type&quot;:&quot;attendants&quot;,&quot;_id&quot;:&quot;123&quot;,&quot;_version&quot;:1}
{&quot;ok&quot;:true,&quot;_index&quot;:&quot;rctest&quot;,&quot;_type&quot;:&quot;attendants&quot;,&quot;_id&quot;:&quot;321&quot;,&quot;_version&quot;:1}
*** REFRESH
{&quot;ok&quot;:true,&quot;_shards&quot;:{&quot;total&quot;:10,&quot;successful&quot;:5,&quot;failed&quot;:0}}
*** All documents
{&quot;took&quot;:2,&quot;timed_out&quot;:false,&quot;_shards&quot;:{&quot;total&quot;:5,&quot;successful&quot;:5,&quot;failed&quot;:0},&quot;hits&quot;:{&quot;total&quot;:2,&quot;max_score&quot;:1.0,&quot;hits&quot;:[{&quot;_index&quot;:&quot;rctest&quot;,&quot;_type&quot;:&quot;attendants&quot;,&quot;_id&quot;:&quot;321&quot;,&quot;_score&quot;:1.0, &quot;_source&quot; : {&quot;is_cool&quot;:false}},{&quot;_index&quot;:&quot;rctest&quot;,&quot;_type&quot;:&quot;attendants&quot;,&quot;_id&quot;:&quot;123&quot;,&quot;_score&quot;:1.0, &quot;_source&quot; : {&quot;is_cool&quot;:true}}]}}
*** Result of query A
{&quot;took&quot;:2,&quot;timed_out&quot;:false,&quot;_shards&quot;:{&quot;total&quot;:5,&quot;successful&quot;:5,&quot;failed&quot;:0},&quot;hits&quot;:{&quot;total&quot;:0,&quot;max_score&quot;:null,&quot;hits&quot;:[]}}
*** Result of Query A as query params
{&quot;took&quot;:2,&quot;timed_out&quot;:false,&quot;_shards&quot;:{&quot;total&quot;:5,&quot;successful&quot;:5,&quot;failed&quot;:0},&quot;hits&quot;:{&quot;total&quot;:0,&quot;max_score&quot;:null,&quot;hits&quot;:[]}}
*** REFRESH
{&quot;ok&quot;:true,&quot;_shards&quot;:{&quot;total&quot;:10,&quot;successful&quot;:5,&quot;failed&quot;:0}}
*** All documents
{&quot;took&quot;:1,&quot;timed_out&quot;:false,&quot;_shards&quot;:{&quot;total&quot;:5,&quot;successful&quot;:5,&quot;failed&quot;:0},&quot;hits&quot;:{&quot;total&quot;:2,&quot;max_score&quot;:1.0,&quot;hits&quot;:[{&quot;_index&quot;:&quot;rctest&quot;,&quot;_type&quot;:&quot;attendants&quot;,&quot;_id&quot;:&quot;321&quot;,&quot;_score&quot;:1.0, &quot;_source&quot; : {&quot;is_cool&quot;:false}},{&quot;_index&quot;:&quot;rctest&quot;,&quot;_type&quot;:&quot;attendants&quot;,&quot;_id&quot;:&quot;123&quot;,&quot;_score&quot;:1.0, &quot;_source&quot; : {&quot;is_cool&quot;:true}}]}}
*** Result of query B
{&quot;took&quot;:1,&quot;timed_out&quot;:false,&quot;_shards&quot;:{&quot;total&quot;:5,&quot;successful&quot;:5,&quot;failed&quot;:0},&quot;hits&quot;:{&quot;total&quot;:1,&quot;max_score&quot;:0.30685282,&quot;hits&quot;:[{&quot;_index&quot;:&quot;rctest&quot;,&quot;_type&quot;:&quot;attendants&quot;,&quot;_id&quot;:&quot;321&quot;,&quot;_score&quot;:0.30685282, &quot;_source&quot; : {&quot;is_cool&quot;:false}}]}}
*** Result of Query B as query params
{&quot;took&quot;:1,&quot;timed_out&quot;:false,&quot;_shards&quot;:{&quot;total&quot;:5,&quot;successful&quot;:5,&quot;failed&quot;:0},&quot;hits&quot;:{&quot;total&quot;:1,&quot;max_score&quot;:0.30685282,&quot;hits&quot;:[{&quot;_index&quot;:&quot;rctest&quot;,&quot;_type&quot;:&quot;attendants&quot;,&quot;_id&quot;:&quot;321&quot;,&quot;_score&quot;:0.30685282, &quot;_source&quot; : {&quot;is_cool&quot;:false}}]}}"><pre class="notranslate"><code class="notranslate">{"ok":true,"acknowledged":true}
{"ok":true,"_index":"rctest","_type":"attendants","_id":"123","_version":1}
{"ok":true,"_index":"rctest","_type":"attendants","_id":"321","_version":1}
*** REFRESH
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}}
*** All documents
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":1.0,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":1.0, "_source" : {"is_cool":false}},{"_index":"rctest","_type":"attendants","_id":"123","_score":1.0, "_source" : {"is_cool":true}}]}}
*** Result of query A
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
*** Result of Query A as query params
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
*** REFRESH
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}}
*** All documents
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":1.0,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":1.0, "_source" : {"is_cool":false}},{"_index":"rctest","_type":"attendants","_id":"123","_score":1.0, "_source" : {"is_cool":true}}]}}
*** Result of query B
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.30685282,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":0.30685282, "_source" : {"is_cool":false}}]}}
*** Result of Query B as query params
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.30685282,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":0.30685282, "_source" : {"is_cool":false}}]}}
</code></pre></div>
<p dir="auto">As you can see, the query for {is_cool: true} doesn't return any data.</p>
<p dir="auto">Effectively, indexing it as lowercase <code class="notranslate">t</code> instead of upper case <code class="notranslate">T</code>. See repo here: <a href="https://gist.github.com/adba5adb18555033f1c1">https://gist.github.com/adba5adb18555033f1c1</a>.</p>