How do I have to migrate the usage of org.elasticsearch.* multiSearchResponse to co.elastic.* MsearchResponse?

I am migrating from org.elasticsearch.* to co.elastic.* classes using elasticsearch-java dependency 8.10.2.
It's really not obvious which co.elastic.* classes are the org.elasticsearvh.* equivalent when replacing the RestHighLevelClient with the new Java Api Client (low-level).
In the past I used

MultiSearchResponse multiSearchResponse =
        elasticsearchClient.execute(MultiSearchAction.INSTANCE, multiSearchRequest).actionGet();

and afterwards I coould handle the SearchResponse.
How do I have to refactor it using the ElasticsearchClient?

MsearchResponse<Article> multiSearchResponse =
            elasticsearchClient.msearch(multiSearchRequest, Article.class);

I am not able anymore to get SearchResponse objects from. instead, I can get a MultiSearchItem by:
MultiSearchItem msi = multiSearchResponse.responses().get(0).result(); (Simplified access.)
...but I am not able anymore to get a SearchResponse object to work upon although a SearchResponse class exists in co.elastic.*
This all is confusing.

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