# Boosting a has\_child in a bool query

**URL:** <https://discuss.elastic.co/t/boosting-a-has-child-in-a-bool-query/10705>\
**Category:** Elasticsearch\
**Created:** [February 12, 2013, 2:16am UTC](https://discuss.elastic.co/t/boosting-a-has-child-in-a-bool-query/10705 "2013-02-12T02:16:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Hagar](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@David\_Hagar](https://discuss.elastic.co/u/David_Hagar)\
**Post date:** [February 12, 2013, 2:16am UTC](https://discuss.elastic.co/t/boosting-a-has-child-in-a-bool-query/10705/1 "2013-02-12T02:16:09Z")

</div>

Can you boost a has\_child query inside of a bool query? Here is my example.  
There are multiple has\_child queries each of which represent a collection  
that contains documents.

Mapping

curl -XPUT '[http://localhost:9200/collection-test?pretty=true](http://localhost:9200/collection-test?pretty=true)' -d '{

```
"settings" : {
    "number_of_shards" : 1,
    "number_of_replicas" : 0
},
"mappings" : {

    "document": {
        "properties": {
            "bodyText": { "type": "string" }
        }
    },
 
    "collection_item": {
        "_parent": { "type": "document" },
        "_all" : {"enabled" : false},
        "properties": {                
            "collection_id": { "type": "integer", "index": 

```

"not\_analyzed" }  
}  
}

```
}

```

}'

Documents

curl -XPUT '[http://localhost:9200/collection-test/document/1](http://localhost:9200/collection-test/document/1)' -d '{

```
"bodyText" : "Creativity is inteligence having fun - Albert Einstein"

```

}'

curl -XPUT '[http://localhost:9200/collection-test/document/2](http://localhost:9200/collection-test/document/2)' -d '{

```
"bodyText" : "Anything one man can imagine, other men can make real. - 

```

Jules Verne"  
}'

curl -XPUT '[http://localhost:9200/collection-test/document/3](http://localhost:9200/collection-test/document/3)' -d '{

```
"bodyText" : "Man will become better when you show him what he is like. 

```

- Anton Chekhov"  
}'

Collections

curl -XPOST localhost:9200/collection-test/collection\_item/1?parent=1 -d '{  
"collection\_id" : "1" }'

curl -XPOST localhost:9200/collection-test/collection\_item/2?parent=1 -d '{  
"collection\_id" : "2" }'  
curl -XPOST localhost:9200/collection-test/collection\_item/4?parent=2 -d '{  
"collection\_id" : "2" }'

Multiple Term and Multiple Collection Query

Note: running this query requires at least ES 0.20.2 to support  
"score\_type".

curl -XPOST localhost:9200/collection-test/document/\_search?pretty=true -d  
'{  
"query" : {  
"bool" : {  
"should" : [  
{  
"term" : { "bodyText" : { "value" : "inteligence", "boost"  
: 1.0 } }  
},  
{  
"term" : { "bodyText" : { "value" : "anything", "boost" :  
1.0 }}  
},  
{  
"has\_child" : {  
"type" : "collection\_item",  
"score\_type" : "sum",  
"query" : {  
"term" : {  
"collection\_id" : "1"  
}  
}  
}  
},  
{  
"has\_child" : {  
"type" : "collection\_item",  
"score\_type" : "sum",  
"query" : {  
"term" : {  
"collection\_id" : "2"  
}  
}  
}  
}  
],  
"minimum\_number\_should\_match" : 1  
}  
}  
}'

--  
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:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [February 12, 2013, 11:41am UTC](https://discuss.elastic.co/t/boosting-a-has-child-in-a-bool-query/10705/2 "2013-02-12T11:41:38Z")

</div>

> Can you boost a has\_child query inside of a bool query? Here is my  
> example. There are multiple has\_child queries each of which represent  
> a collection that contains documents.

Yes, just write it as:

{ has\_child: {  
boost: 2,  
...

clint

> Mapping
> 
> curl -XPUT '[http://localhost:9200/collection-test?pretty=true](http://localhost:9200/collection-test?pretty=true)' -d '{
> 
> ```
> "settings" : {
> "number_of_shards" : 1,
> "number_of_replicas" : 0
> },
> "mappings" : {
> 
> "document": {
> "properties": {
> "bodyText": { "type": "string" }
> }
> },
>  
> "collection_item": {
> "_parent": { "type": "document" },
> "_all" : {"enabled" : false},
> "properties": {                
> "collection_id": { "type": "integer", "index":
> 
> ```
> 
> "not\_analyzed" }  
> }  
> }
> 
> ```
> }
> 
> ```
> 
> }'
> 
> Documents
> 
> curl -XPUT '[http://localhost:9200/collection-test/document/1](http://localhost:9200/collection-test/document/1)' -d '{
> 
> ```
> "bodyText" : "Creativity is inteligence having fun - Albert
> 
> ```
> 
> Einstein"  
> }'
> 
> curl -XPUT '[http://localhost:9200/collection-test/document/2](http://localhost:9200/collection-test/document/2)' -d '{
> 
> ```
> "bodyText" : "Anything one man can imagine, other men can make
> 
> ```
> 
> real. - Jules Verne"  
> }'
> 
> curl -XPUT '[http://localhost:9200/collection-test/document/3](http://localhost:9200/collection-test/document/3)' -d '{
> 
> ```
> "bodyText" : "Man will become better when you show him what he is
> 
> ```
> 
> like. - Anton Chekhov"  
> }'
> 
> Collections
> 
> curl -XPOST localhost:9200/collection-test/collection\_item/1?parent=1  
> -d '{ "collection\_id" : "1" }'
> 
> curl -XPOST localhost:9200/collection-test/collection\_item/2?parent=1  
> -d '{ "collection\_id" : "2" }'  
> curl -XPOST localhost:9200/collection-test/collection\_item/4?parent=2  
> -d '{ "collection\_id" : "2" }'
> 
> Multiple Term and Multiple Collection Query
> 
> Note: running this query requires at least ES 0.20.2 to support  
> "score\_type".
> 
> curl -XPOST  
> localhost:9200/collection-test/document/\_search?pretty=true -d '{  
> "query" : {  
> "bool" : {  
> "should" : [  
> {  
> "term" : { "bodyText" : { "value" : "inteligence",  
> "boost" : 1.0 } }  
> },  
> {  
> "term" : { "bodyText" : { "value" : "anything",  
> "boost" : 1.0 }}  
> },  
> {  
> "has\_child" : {  
> "type" : "collection\_item",  
> "score\_type" : "sum",  
> "query" : {  
> "term" : {  
> "collection\_id" : "1"  
> }  
> }  
> }  
> },  
> {  
> "has\_child" : {  
> "type" : "collection\_item",  
> "score\_type" : "sum",  
> "query" : {  
> "term" : {  
> "collection\_id" : "2"  
> }  
> }  
> }  
> }  
> ],  
> "minimum\_number\_should\_match" : 1  
> }  
> }  
> }'
> 
> --  
> 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:** ![David\_Hagar](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@David\_Hagar](https://discuss.elastic.co/u/David_Hagar)\
**Post date:** [February 12, 2013, 10:17pm UTC](https://discuss.elastic.co/t/boosting-a-has-child-in-a-bool-query/10705/3 "2013-02-12T22:17:37Z")

</div>

Many thanks. Adding a boost field works. You are the only one here  
answering my questions so far 🙂 . The documentation for has\_child doesn't  
show a boost field. Is there a process for updating it?  
([http://www.elasticsearch.org/guide/reference/query-dsl/has-child-filter.html](http://www.elasticsearch.org/guide/reference/query-dsl/has-child-filter.html))

On Tuesday, 12 February 2013 05:41:38 UTC-6, Clinton Gormley wrote:

> > Can you boost a has\_child query inside of a bool query? Here is my  
> > example. There are multiple has\_child queries each of which represent  
> > a collection that contains documents.
> 
> Yes, just write it as:
> 
> { has\_child: {  
> boost: 2,  
> ...
> 
> clint
> 
> > Mapping
> > 
> > curl -XPUT '[http://localhost:9200/collection-test?pretty=true](http://localhost:9200/collection-test?pretty=true)' -d '{
> > 
> > ```
> > "settings" : { 
> > "number_of_shards" : 1, 
> > "number_of_replicas" : 0 
> > }, 
> > "mappings" : { 
> > 
> > "document": { 
> > "properties": { 
> > "bodyText": { "type": "string" } 
> > } 
> > }, 
> >   
> > "collection_item": { 
> > "_parent": { "type": "document" }, 
> > "_all" : {"enabled" : false}, 
> > "properties": {                 
> > "collection_id": { "type": "integer", "index": 
> > 
> > ```
> > 
> > "not\_analyzed" }  
> > }  
> > }
> > 
> > ```
> > } 
> > 
> > ```
> > 
> > }'
> > 
> > Documents
> > 
> > curl -XPUT '[http://localhost:9200/collection-test/document/1](http://localhost:9200/collection-test/document/1)' -d '{
> > 
> > ```
> > "bodyText" : "Creativity is inteligence having fun - Albert 
> > 
> > ```
> > 
> > Einstein"  
> > }'
> > 
> > curl -XPUT '[http://localhost:9200/collection-test/document/2](http://localhost:9200/collection-test/document/2)' -d '{
> > 
> > ```
> > "bodyText" : "Anything one man can imagine, other men can make 
> > 
> > ```
> > 
> > real. - Jules Verne"  
> > }'
> > 
> > curl -XPUT '[http://localhost:9200/collection-test/document/3](http://localhost:9200/collection-test/document/3)' -d '{
> > 
> > ```
> > "bodyText" : "Man will become better when you show him what he is 
> > 
> > ```
> > 
> > like. - Anton Chekhov"  
> > }'
> > 
> > Collections
> > 
> > curl -XPOST localhost:9200/collection-test/collection\_item/1?parent=1  
> > -d '{ "collection\_id" : "1" }'
> > 
> > curl -XPOST localhost:9200/collection-test/collection\_item/2?parent=1  
> > -d '{ "collection\_id" : "2" }'  
> > curl -XPOST localhost:9200/collection-test/collection\_item/4?parent=2  
> > -d '{ "collection\_id" : "2" }'
> > 
> > Multiple Term and Multiple Collection Query
> > 
> > Note: running this query requires at least ES 0.20.2 to support  
> > "score\_type".
> > 
> > curl -XPOST  
> > localhost:9200/collection-test/document/\_search?pretty=true -d '{  
> > "query" : {  
> > "bool" : {  
> > "should" : [  
> > {  
> > "term" : { "bodyText" : { "value" : "inteligence",  
> > "boost" : 1.0 } }  
> > },  
> > {  
> > "term" : { "bodyText" : { "value" : "anything",  
> > "boost" : 1.0 }}  
> > },  
> > {  
> > "has\_child" : {  
> > "type" : "collection\_item",  
> > "score\_type" : "sum",  
> > "query" : {  
> > "term" : {  
> > "collection\_id" : "1"  
> > }  
> > }  
> > }  
> > },  
> > {  
> > "has\_child" : {  
> > "type" : "collection\_item",  
> > "score\_type" : "sum",  
> > "query" : {  
> > "term" : {  
> > "collection\_id" : "2"  
> > }  
> > }  
> > }  
> > }  
> > ],  
> > "minimum\_number\_should\_match" : 1  
> > }  
> > }  
> > }'
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > 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:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [February 13, 2013, 9:48am UTC](https://discuss.elastic.co/t/boosting-a-has-child-in-a-bool-query/10705/4 "2013-02-13T09:48:33Z")

</div>

On Tue, 2013-02-12 at 14:17 -0800, David Hagar wrote:

> Many thanks. Adding a boost field works. You are the only one here  
> answering my questions so far 🙂 . The documentation for has\_child  
> doesn't show a boost field. Is there a process for updating it?  
> ([http://www.elasticsearch.org/guide/reference/query-dsl/has-child-filter.html](http://www.elasticsearch.org/guide/reference/query-dsl/has-child-filter.html))

You can fork the docs at  
[https://github.com/elasticsearch/elasticsearch.github.com](https://github.com/elasticsearch/elasticsearch.github.com) and send a  
pull request

thanks

clint

> On Tuesday, 12 February 2013 05:41:38 UTC-6, Clinton Gormley wrote:
> 
> ```
> > 
> > Can you boost a has_child query inside of a bool query? Here
> is my 
> > example. There are multiple has_child queries each of which
> represent 
> > a collection that contains documents. 
>     
> Yes, just write it as: 
>     
> { has_child: { 
> boost: 2, 
> ... 
>     
> clint 
>     
> > 
> > 
> > 
> > 
> > Mapping 
> > 
> > 
> > curl -XPUT
> 'http://localhost:9200/collection-test?pretty=true' -d '{ 
> > 
> > 
> > "settings" : { 
> > "number_of_shards" : 1, 
> > "number_of_replicas" : 0 
> > }, 
> > "mappings" : { 
> >     
> > "document": { 
> > "properties": { 
> > "bodyText": { "type": "string" } 
> > } 
> > }, 
> >       
> > "collection_item": { 
> > "_parent": { "type": "document" }, 
> > "_all" : {"enabled" : false}, 
> > "properties": {                 
> > "collection_id": { "type": "integer",
> "index": 
> > "not_analyzed" } 
> > } 
> > } 
> >           
> > } 
> > }' 
> > 
> > 
> > 
> > 
> > Documents 
> > 
> > 
> > curl -XPUT
> 'http://localhost:9200/collection-test/document/1' -d '{ 
> > 
> > 
> > "bodyText" : "Creativity is inteligence having fun -
> Albert 
> > Einstein" 
> > }' 
> > 
> > 
> > curl -XPUT
> 'http://localhost:9200/collection-test/document/2' -d '{ 
> >     
> > "bodyText" : "Anything one man can imagine, other men
> can make 
> > real. - Jules Verne" 
> > }' 
> > 
> > 
> > curl -XPUT
> 'http://localhost:9200/collection-test/document/3' -d '{ 
> >     
> > "bodyText" : "Man will become better when you show him
> what he is 
> > like. - Anton Chekhov" 
> > }' 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Collections 
> > 
> > 
> > curl -XPOST
> localhost:9200/collection-test/collection_item/1?parent=1 
> > -d '{ "collection_id" : "1" }' 
> > 
> > 
> > curl -XPOST
> localhost:9200/collection-test/collection_item/2?parent=1 
> > -d '{ "collection_id" : "2" }' 
> > curl -XPOST
> localhost:9200/collection-test/collection_item/4?parent=2 
> > -d '{ "collection_id" : "2" }' 
> > 
> > 
> > 
> > 
> > 
> > 
> > Multiple Term and Multiple Collection Query 
> > 
> > 
> > Note: running this query requires at least ES 0.20.2 to
> support 
> > "score_type". 
> > 
> > 
> > 
> > 
> > curl -XPOST 
> > localhost:9200/collection-test/document/_search?pretty=true
> -d '{ 
> > "query" : { 
> > "bool" : {       
> > "should" : [ 
> > { 
> > "term" : { "bodyText" : { "value" :
> "inteligence", 
> > "boost" : 1.0 } } 
> > }, 
> > { 
> > "term" : { "bodyText" : { "value" :
> "anything", 
> > "boost" : 1.0 }} 
> > }, 
> > { 
> > "has_child" : {       
> > "type" : "collection_item", 
> > "score_type" : "sum", 
> > "query" : { 
> > "term" : { 
> > "collection_id" : "1" 
> > } 
> > } 
> > } 
> > }, 
> > { 
> > "has_child" : {       
> > "type" : "collection_item", 
> > "score_type" : "sum", 
> > "query" : { 
> > "term" : { 
> > "collection_id" : "2" 
> > } 
> > } 
> > } 
> > } 
> > ], 
> > "minimum_number_should_match" : 1 
> > } 
> > } 
> > }' 
> > 
> > 
> > -- 
> > 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 elasticsearc...@googlegroups.com. 
> > For more options, visit
> 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).

--  
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:** ![mattweber](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattweber/32/44940_2.png) [@mattweber](https://discuss.elastic.co/u/mattweber)\
**Post date:** [February 13, 2013, 5:08pm UTC](https://discuss.elastic.co/t/boosting-a-has-child-in-a-bool-query/10705/5 "2013-02-13T17:08:10Z")

</div>

FYI, every query type supports a boost. Also, I have completely  
documented every query, filter, and facet while implementing  
Elastic.js. These docs can be useful even when using the RESP api,  
especially if you use them along with the query translator that  
converts the javascript to the REST version of the request.

[http://docs.fullscale.co/elasticjs/](http://docs.fullscale.co/elasticjs/)  
[http://docs.fullscale.co/translator/](http://docs.fullscale.co/translator/)

Thanks,  
Matt Weber

On Wed, Feb 13, 2013 at 1:48 AM, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com) wrote:

> On Tue, 2013-02-12 at 14:17 -0800, David Hagar wrote:
> 
> > Many thanks. Adding a boost field works. You are the only one here  
> > answering my questions so far 🙂 . The documentation for has\_child  
> > doesn't show a boost field. Is there a process for updating it?  
> > ([Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/has-child-filter.html))
> 
> You can fork the docs at  
> [https://github.com/elasticsearch/elasticsearch.github.com](https://github.com/elasticsearch/elasticsearch.github.com) and send a  
> pull request
> 
> thanks
> 
> clint
> 
> > On Tuesday, 12 February 2013 05:41:38 UTC-6, Clinton Gormley wrote:
> > 
> > ```
> > >
> > > Can you boost a has_child query inside of a bool query? Here
> > is my
> > > example. There are multiple has_child queries each of which
> > represent
> > > a collection that contains documents.
> > 
> > Yes, just write it as:
> > 
> > { has_child: {
> > boost: 2,
> > ...
> > 
> > clint
> > 
> > >
> > >
> > >
> > >
> > > Mapping
> > >
> > >
> > > curl -XPUT
> > 'http://localhost:9200/collection-test?pretty=true' -d '{
> > >
> > >
> > > "settings" : {
> > > "number_of_shards" : 1,
> > > "number_of_replicas" : 0
> > > },
> > > "mappings" : {
> > >
> > > "document": {
> > > "properties": {
> > > "bodyText": { "type": "string" }
> > > }
> > > },
> > >
> > > "collection_item": {
> > > "_parent": { "type": "document" },
> > > "_all" : {"enabled" : false},
> > > "properties": {
> > > "collection_id": { "type": "integer",
> > "index":
> > > "not_analyzed" }
> > > }
> > > }
> > >
> > > }
> > > }'
> > >
> > >
> > >
> > >
> > > Documents
> > >
> > >
> > > curl -XPUT
> > 'http://localhost:9200/collection-test/document/1' -d '{
> > >
> > >
> > > "bodyText" : "Creativity is inteligence having fun -
> > Albert
> > > Einstein"
> > > }'
> > >
> > >
> > > curl -XPUT
> > 'http://localhost:9200/collection-test/document/2' -d '{
> > >
> > > "bodyText" : "Anything one man can imagine, other men
> > can make
> > > real. - Jules Verne"
> > > }'
> > >
> > >
> > > curl -XPUT
> > 'http://localhost:9200/collection-test/document/3' -d '{
> > >
> > > "bodyText" : "Man will become better when you show him
> > what he is
> > > like. - Anton Chekhov"
> > > }'
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Collections
> > >
> > >
> > > curl -XPOST
> > localhost:9200/collection-test/collection_item/1?parent=1
> > > -d '{ "collection_id" : "1" }'
> > >
> > >
> > > curl -XPOST
> > localhost:9200/collection-test/collection_item/2?parent=1
> > > -d '{ "collection_id" : "2" }'
> > > curl -XPOST
> > localhost:9200/collection-test/collection_item/4?parent=2
> > > -d '{ "collection_id" : "2" }'
> > >
> > >
> > >
> > >
> > >
> > >
> > > Multiple Term and Multiple Collection Query
> > >
> > >
> > > Note: running this query requires at least ES 0.20.2 to
> > support
> > > "score_type".
> > >
> > >
> > >
> > >
> > > curl -XPOST
> > > localhost:9200/collection-test/document/_search?pretty=true
> > -d '{
> > > "query" : {
> > > "bool" : {
> > > "should" : [
> > > {
> > > "term" : { "bodyText" : { "value" :
> > "inteligence",
> > > "boost" : 1.0 } }
> > > },
> > > {
> > > "term" : { "bodyText" : { "value" :
> > "anything",
> > > "boost" : 1.0 }}
> > > },
> > > {
> > > "has_child" : {
> > > "type" : "collection_item",
> > > "score_type" : "sum",
> > > "query" : {
> > > "term" : {
> > > "collection_id" : "1"
> > > }
> > > }
> > > }
> > > },
> > > {
> > > "has_child" : {
> > > "type" : "collection_item",
> > > "score_type" : "sum",
> > > "query" : {
> > > "term" : {
> > > "collection_id" : "2"
> > > }
> > > }
> > > }
> > > }
> > > ],
> > > "minimum_number_should_match" : 1
> > > }
> > > }
> > > }'
> > >
> > >
> > > --
> > > 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 elasticsearc...@googlegroups.com.
> > > For more options, visit
> > 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).
> 
> --  
> 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:51am UTC](https://discuss.elastic.co/t/boosting-a-has-child-in-a-bool-query/10705/6 "2017-07-06T02:51:36Z")

</div>


