# Nested commontermsquery with bool Search

**URL:** https://discuss.elastic.co/t/nested-commontermsquery-with-bool-search/137360
**Category:** Elasticsearch
**Created:** [June 26, 2018, 5:03am UTC](https://discuss.elastic.co/t/nested-commontermsquery-with-bool-search/137360 "2018-06-26T05:03:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![satyarajp](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@satyarajp](https://discuss.elastic.co/u/satyarajp)
#### Post date: [June 26, 2018, 5:03am UTC](https://discuss.elastic.co/t/nested-commontermsquery-with-bool-search/137360/1 "2018-06-26T05:03:18Z")

</div>

- I'm trying to improve my search query to effectively work with stop words.  
Here is the nested query I'm trying to work with, but this results in not so proper search results.

I need help with

1. Is this query valid , nesting common inside bool.

2. If common has to be used seperately how to match 'must' with multiple fields

* * *

## { "query" : { "bool" : { "must" : [{ "bool" : { "should" : [ { "common" : { "title" : { "query" : "nandini", "disable\_coord" : true, "high\_freq\_operator" : "OR", "low\_freq\_operator" : "OR", "cutoff\_frequency" : 0.01, "boost" : 1.0 } } }, { "common" : { "personsFullNames" : { "query" : "nandini", "disable\_coord" : true, "high\_freq\_operator" : "OR", "low\_freq\_operator" : "OR", "cutoff\_frequency" : 0.01, "boost" : 1.0 } } }], "disable\_coord" : false, "adjust\_pure\_negative" : true, "boost" : 1.0 } }, { "terms" : { "language" : ["telugu"], "boost" : 1.0 } } ], "filter" : [{ "range" : { "expirationDate" : { "from" : 1529935802013, "to" : null, "include\_lower" : true, "include\_upper" : true, "boost" : 1.0 } } }], "disable\_coord" : false, "adjust\_pure\_negative" : true, "boost" : 1.0 } } }

---

<div class="post-metadata">

### Author: ![satyarajp](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@satyarajp](https://discuss.elastic.co/u/satyarajp)
#### Post date: [July 4, 2018, 4:22am UTC](https://discuss.elastic.co/t/nested-commontermsquery-with-bool-search/137360/2 "2018-07-04T04:22:33Z")

</div>

Hi Team,

Please let me know if I'm missing more detail.

Thank you,  
SatyaRaj

---

<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: [August 1, 2018, 4:22am UTC](https://discuss.elastic.co/t/nested-commontermsquery-with-bool-search/137360/3 "2018-08-01T04:22:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
