# Pinned Query with Term Aggregation get me null\_pointer\_exception

**URL:** <https://discuss.elastic.co/t/pinned-query-with-term-aggregation-get-me-null-pointer-exception/227932>\
**Category:** Elasticsearch\
**Created:** [April 14, 2020, 2:04pm UTC](https://discuss.elastic.co/t/pinned-query-with-term-aggregation-get-me-null-pointer-exception/227932 "2020-04-14T14:04:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [April 14, 2020, 2:29pm UTC](https://discuss.elastic.co/t/pinned-query-with-term-aggregation-get-me-null-pointer-exception/227932/2 "2020-04-14T14:29:40Z")

</div>

> [@dearste](#):
>
> { "query": { "pinned": { "ids": ["1819"], "organic": { "bool": { "must": [{ "multi\_match": { "query": "test", "fields": ["name.lowercase^5", "synonim^4", "sku.lowercase^3", "description^1"], "operator" : "and", "fuzziness" : 1, "analyzer": "synonym" } } ] } } } }, "aggs": { "categories\_without\_path": { "terms": { "field": "categories\_without\_path", "size": 10 } } }, "suggest": { "suggestion": { "prefix": "test", "completion": { "field": "suggest", "size": 5 } } } }

This [issue](https://github.com/elastic/elasticsearch/issues/51034) will be fixed in 7.7

---

_[View the full topic](https://discuss.elastic.co/t/pinned-query-with-term-aggregation-get-me-null-pointer-exception/227932)._
