Multi terms aggregation java client

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Using gradle

dependencies {
implementation ‘org.opensearch.client:opensearch-rest-client: 2.5.0’
implementation ‘org.opensearch.client:opensearch-java:2.0.0’
}

Describe the issue:
According to the opensearch docs whenever we need to perform an aggregated query on multiple fields, it is just a matter to use multi_terms aggregation like this:

GET my_index/_search
{
  "query": {
    "bool" : {
      "must" : [
        {"match" : {"my_field" : {"query" : "my value"}}}
      ]
    }
  },
  "size": 0, 
  "aggs": {
    "my_aggregate": {
      "multi_terms": {
        "size": 500,
        "terms": [
          {
            "field": "second_field"
          },
          {
            "field": "other_field" 
          }
        ]
      }   
    }
  }
}

where we can see how easy is to specify the number of buckets we want to retrieve by setting size=500. The above aggregation can be translated to java like this:

new Aggregation.Builder()
  .multiTerms(t -> t.terms(List.of(
      MultiTermLookup.of(mt -> mt.field("second_field")),
      MultiTermLookup.of(mt -> mt.field("other_field"))
  ))))
  .build();

But it seems that the java client does not allow to specify the number of buckets to retrieve, then an aggregated query with multi_terms always returns 10 buckets by default.

Is there any plans to allow multi_terms in java client to set the size parameter?

Hello @mcwiise - per this document, I think you should be able to

I had the same problem but in the latest versión it has been solved.
Code:

        MultiTermLookup rt1 = MultiTermLookup.of(f -> f.field("decision.idtipodecision"));
        MultiTermLookup rt2 = MultiTermLookup.of(f -> f.field("decision.resumendecision"));

        List<MultiTermLookup> multiTermLookupList = new ArrayList<>();
        multiTermLookupList.add(rt1);
        multiTermLookupList.add(rt2);
		
		MultiTermsAggregation multi = new MultiTermsAggregation.Builder().terms(multiTermLookupList).size(50).build();
        Aggregation aggDecision = Aggregation.of(t -> t.multiTerms(multi));
        requestBuilder.aggregations(Map.of("decision", aggDecision));

Maven version:

<dependency>
  <groupId>org.opensearch.client</groupId>
  <artifactId>opensearch-java</artifactId>
  <version>2.8.1</version>
</dependency>

I hope someone finds it useful.