# Problem with bool query

**URL:** <https://discuss.elastic.co/t/problem-with-bool-query/11320>\
**Category:** Elasticsearch\
**Created:** [March 26, 2013, 3:20pm UTC](https://discuss.elastic.co/t/problem-with-bool-query/11320 "2013-03-26T15:20:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bartolome\_Serapio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bartolome_serapio/32/2563_2.png) [@Bartolome\_Serapio](https://discuss.elastic.co/u/Bartolome_Serapio)\
**Post date:** [March 26, 2013, 3:20pm UTC](https://discuss.elastic.co/t/problem-with-bool-query/11320/1 "2013-03-26T15:20:17Z")

</div>

Hi, I've a question about bool query.

Here you can see my configuration and an example of the query and the one  
document , [https://gist.github.com/ballbrk/5246152](https://gist.github.com/ballbrk/5246152).

The problem that the query didn't return any source .

Could you help me ?

Regards

--  
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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 28, 2013, 8:38am UTC](https://discuss.elastic.co/t/problem-with-bool-query/11320/2 "2013-03-28T08:38:24Z")

</div>

Hey there,

I was unable to reproduce your issue using your gist, as I could not index  
the product json. Also the amount of fields is quite a lot (you are only  
querying a part of it), so it would be great if you could provide a minimal  
example. This simplifies the issue to solve.

What you can try locally is to use the explain API to get more information  
why a document is (not) matching

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Also your query is faster on subsequent requests, if you are using a filter  
instead of a query (but does not change functionality, so first priority is  
to work as expected).

--Alex

On Tue, Mar 26, 2013 at 4:20 PM, Bartolome Serapio [tolo@mola.com](mailto:tolo@mola.com) wrote:

> Hi, I've a question about bool query.
> 
> Here you can see my configuration and an example of the query and the one  
> document , [Problem with ElasticSearch 0.90 RC1 · GitHub](https://gist.github.com/ballbrk/5246152).
> 
> The problem that the query didn't return any source .
> 
> Could you help me ?
> 
> Regards
> 
> --  
> 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).

--  
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:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [March 28, 2013, 4:56pm UTC](https://discuss.elastic.co/t/problem-with-bool-query/11320/3 "2013-03-28T16:56:45Z")

</div>

Your mapping is for 'products' and your document is for 'product'.

--  
Ivan

On Tue, Mar 26, 2013 at 8:20 AM, Bartolome Serapio [tolo@mola.com](mailto:tolo@mola.com) wrote:

> Hi, I've a question about bool query.
> 
> Here you can see my configuration and an example of the query and the one  
> document , [Problem with ElasticSearch 0.90 RC1 · GitHub](https://gist.github.com/ballbrk/5246152).
> 
> The problem that the query didn't return any source .
> 
> Could you help me ?
> 
> Regards
> 
> --  
> 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).

--  
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:43am UTC](https://discuss.elastic.co/t/problem-with-bool-query/11320/4 "2017-07-06T02:43:48Z")

</div>


