# ES 7.12 - Java rest high level - multi\_terms aggregation - response error

**URL:** <https://discuss.elastic.co/t/es-7-12-java-rest-high-level-multi-terms-aggregation-response-error/272101>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [May 4, 2021, 5:57pm UTC](https://discuss.elastic.co/t/es-7-12-java-rest-high-level-multi-terms-aggregation-response-error/272101 "2021-05-04T17:57:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hikemachado](https://avatars.discourse-cdn.com/v4/letter/h/71c47a/32.png) [@hikemachado](https://discuss.elastic.co/u/hikemachado)\
**Post date:** [May 4, 2021, 5:57pm UTC](https://discuss.elastic.co/t/es-7-12-java-rest-high-level-multi-terms-aggregation-response-error/272101/1 "2021-05-04T17:57:01Z")

</div>

Hi there,  
I've a request using SearchTemplateRequest  
the request script uses "multi\_terms" aggregation

I can see in the logs that the response comes as expected but the java rest high level throws an exception saying

```auto
org.elasticsearch.common.xcontent.NamedObjectNotFoundException: unknown field [multi_terms]

```

looks like it is unsupported by the java client

Thanks for any help

Request script ref:

```auto
{
  "size": 0, 
  "query": {
    "bool": {
      "filter": [
        { "term": {
          "process.tag.telemetry@sdk@name" : "opentelemetry"
        }},
        { "exists": {
          "field": "process.tag.telemetry@sdk@name"
        }},
        { "term": {
          "tag.span@kind" : "server"
        }},
        { "term": {
          "process.serviceName" : "ServiceName"
        }},
        { "term": {
          "process.tag.hostname" : "HostName"
        }}
      ]
    }
  },
    "aggs": {
    "spans": {
      "multi_terms": {
        "terms": [
          {"field": "operationName","missing": ""},
          {"field": "tag.http@url","missing": ""}
          ],
          "size": 100
      },
      "aggs": {
        "ids": {
          "terms": {
            "field": "spanID","size": 100
          }
        }
      }
    }
  },
  "fields": [
    "operationName"
  ]
  ,
  "_source": false
}

```

---

<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 1, 2021, 5:57pm UTC](https://discuss.elastic.co/t/es-7-12-java-rest-high-level-multi-terms-aggregation-response-error/272101/2 "2021-06-01T17:57:17Z")

</div>

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