# ES 7.7 Scripted metric stopped working when cross cluster search is used

**URL:** <https://discuss.elastic.co/t/es-7-7-scripted-metric-stopped-working-when-cross-cluster-search-is-used/233972>\
**Category:** Elasticsearch\
**Created:** [May 23, 2020, 1:35am UTC](https://discuss.elastic.co/t/es-7-7-scripted-metric-stopped-working-when-cross-cluster-search-is-used/233972 "2020-05-23T01:35:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [May 23, 2020, 1:35am UTC](https://discuss.elastic.co/t/es-7-7-scripted-metric-stopped-working-when-cross-cluster-search-is-used/233972/1 "2020-05-23T01:35:10Z")

</div>

Hi team,

I have a simple cross cluster search query using [scripted metric aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-scripted-metric-aggregation.html) that used to work in version 6.8.

After upgrading all the clusters from 6.8 to 7.7, the cross cluster query does not error out but returns a json without any hits or aggs in the json.

I checked the node logs and the only thing that it was logging is a null pointer exception.

There isn't any documentation about any breaking changes regarding this so was wondering if anybody has any insight into this?

Thanks

---

<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:** [June 20, 2020, 1:35am UTC](https://discuss.elastic.co/t/es-7-7-scripted-metric-stopped-working-when-cross-cluster-search-is-used/233972/2 "2020-06-20T01:35:11Z")

</div>

Closed on June 20, 2020, 1:35am UTC

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