# Must query error working to match two terms

**URL:** <https://discuss.elastic.co/t/must-query-error-working-to-match-two-terms/140242>\
**Category:** Elasticsearch\
**Created:** [July 17, 2018, 3:11am UTC](https://discuss.elastic.co/t/must-query-error-working-to-match-two-terms/140242 "2018-07-17T03:11:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shekhar\_Pandey](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shekhar\_Pandey](https://discuss.elastic.co/u/Shekhar_Pandey)\
**Post date:** [July 17, 2018, 3:11am UTC](https://discuss.elastic.co/t/must-query-error-working-to-match-two-terms/140242/1 "2018-07-17T03:11:12Z")

</div>

my elastic search result is....  
.......  
string\_facet": [  
{  
"facet-value": "puma",  
"facet-name": "brand"  
},  
{  
"facet-value": "amazon",  
"facet-name": "site"  
}  
],  
................

query not working....  
nested": {  
"path": "search\_data.string\_facet",  
"query": {  
"bool": {  
"must": [  
{  
"term": {  
"search\_data.string\_facet.facet-name": "puma"  
},  
"term": {  
"search\_data.string\_facet.facet-value": "amazon"  
}  
}]

......  
Can you kindly tell me how I can check puma And amazon only show not others...so I kept these things inside of must...but its not working....I want AND operator so I kept inside of the must.

Hope to hear from you soon.

---

<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 14, 2018, 3:18am UTC](https://discuss.elastic.co/t/must-query-error-working-to-match-two-terms/140242/2 "2018-08-14T03:18:15Z")

</div>

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