# RequestError: RequestError(400, 'parsing\_exception', '\[terms\] query does not support \[country\]')

**URL:** <https://discuss.elastic.co/t/requesterror-requesterror-400-parsing-exception-terms-query-does-not-support-country/230841>\
**Category:** Elasticsearch\
**Created:** [May 3, 2020, 3:37am UTC](https://discuss.elastic.co/t/requesterror-requesterror-400-parsing-exception-terms-query-does-not-support-country/230841 "2020-05-03T03:37:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TanmoyP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanmoyp/32/67578_2.png) [@TanmoyP](https://discuss.elastic.co/u/TanmoyP)\
**Post date:** [May 3, 2020, 3:37am UTC](https://discuss.elastic.co/t/requesterror-requesterror-400-parsing-exception-terms-query-does-not-support-country/230841/1 "2020-05-03T03:37:54Z")

</div>

I am new to Elasticsearch and getting error while running this:

```auto
for brand in extract['brand'].values:
    s_names = Search() \
                .query('multi_match', 
                       type = "cross_fields", 
                       query = brand, 
                       fields = ['field 1', 'field 2']) \
                .filter("terms", country="United Kingdom") \
                .query('bool', filter=[(Q("match", brand=brand)) | (~Q("exists", field='brand'))]) \
                .query('bool', filter=[(Q("match", industry='Automobile')) | (~Q("exists", field='industry'))]) 
    s_names.aggs \
                .bucket('bucket_name', 'terms', field='bucket_field', size=500) \
                .metric('best', 'top_hits', size=10)
    ms_names = ms_names.add(s_names)
    
responses_names = ms_names.execute()

```

```
RequestError: RequestError(400, 'parsing_exception', '[terms] query does not support [country]')

```

Can somebody please help me out, what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![TanmoyP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanmoyp/32/67578_2.png) [@TanmoyP](https://discuss.elastic.co/u/TanmoyP)\
**Post date:** [May 3, 2020, 4:35am UTC](https://discuss.elastic.co/t/requesterror-requesterror-400-parsing-exception-terms-query-does-not-support-country/230841/2 "2020-05-03T04:35:58Z")

</div>

Found it:

```auto
.filter("terms", country=["United Kingdom"])

```

---

<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:** [May 31, 2020, 4:42am UTC](https://discuss.elastic.co/t/requesterror-requesterror-400-parsing-exception-terms-query-does-not-support-country/230841/3 "2020-05-31T04:42:27Z")

</div>

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