# Complicated bool query not find my document

**URL:** <https://discuss.elastic.co/t/complicated-bool-query-not-find-my-document/11922>\
**Category:** Elasticsearch\
**Created:** [May 11, 2013, 8:22pm UTC](https://discuss.elastic.co/t/complicated-bool-query-not-find-my-document/11922 "2013-05-11T20:22:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![reshet\_ukr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reshet_ukr/32/2339_2.png) [@reshet\_ukr](https://discuss.elastic.co/u/reshet_ukr)\
**Post date:** [May 11, 2013, 8:22pm UTC](https://discuss.elastic.co/t/complicated-bool-query-not-find-my-document/11922/1 "2013-05-11T20:22:59Z")

</div>

This search query return 0 hits  
{"bool":{"must":[{"bool":{"should":[{"term":{"socioresearch\_gen\_geath":"Выпускники  
школ"}}]}}]}}

However the document indexed has its structure as follows

{"socioresearch\_name":"Исследование выпускников университетов",  
"socioresearch\_dates\_start\_date":"2009-4-10T0:0:0",  
"socioresearch\_dates\_end\_date":"2010-4-29T0:0:0",  
"socioresearch\_gen\_geath":"Выпускники школ", "socioresearch\_sel\_size":1567,  
"socioresearch\_generation\_type\_randomity":"случайная",  
"socioresearch\_generation\_type\_levels":"многоступенчатая",  
"socioresearch\_orgs\_org\_order\_organization":"КЦПИК",  
"socioresearch\_orgs\_org\_impl\_organization":"КМИС"}

Where we can see that field "socioresearch\_gen\_geath" I'am interested in  
indexed.  
Who knows what is wrong there?  
How good nested bool queries works itself?

--  
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:** ![jxerome](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jxerome/32/44932_2.png) [@jxerome](https://discuss.elastic.co/u/jxerome)\
**Post date:** [May 11, 2013, 8:58pm UTC](https://discuss.elastic.co/t/complicated-bool-query-not-find-my-document/11922/2 "2013-05-11T20:58:56Z")

</div>

Hello,

Is your document found by this query ?  
{"bool":{"must":[{"bool":{"should":[{"_match_":{"socioresearch\_gen\_geath":"Выпускники  
школ"}}]}}]}}

I suppose that the field socioresearch\_gen\_geath is analyzed. So you  
should use match or provide your query with valid terms.

Jérôme Mainaud  
[jerome@mainaud.com](mailto:jerome@mainaud.com)

Le 11/05/13 22:22, [reshet.ukr@gmail.com](mailto:reshet.ukr@gmail.com) a écrit :

> This search query return 0 hits  
> {"bool":{"must":[{"bool":{"should":[{"term":{"socioresearch\_gen\_geath":"Выпускники  
> школ"}}]}}]}}
> 
> However the document indexed has its structure as follows
> 
> {"socioresearch\_name":"Исследование выпускников университетов",  
> "socioresearch\_dates\_start\_date":"2009-4-10T0:0:0",  
> "socioresearch\_dates\_end\_date":"2010-4-29T0:0:0",  
> "socioresearch\_gen\_geath":"Выпускники школ",  
> "socioresearch\_sel\_size":1567,  
> "socioresearch\_generation\_type\_randomity":"случайная",  
> "socioresearch\_generation\_type\_levels":"многоступенчатая",  
> "socioresearch\_orgs\_org\_order\_organization":"КЦПИК",  
> "socioresearch\_orgs\_org\_impl\_organization":"КМИС"}
> 
> ## Where we can see that field "socioresearch\_gen\_geath" I'am interested in indexed. Who knows what is wrong there? How good nested bool queries works itself?
> 
> 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:37am UTC](https://discuss.elastic.co/t/complicated-bool-query-not-find-my-document/11922/3 "2017-07-06T02:37:02Z")

</div>


