Hybrid Search Java Api not returning Rank

Hello.
I want to perform hybrid search using java client.
With elasticsarch-java 8.11 environment, this is my query:

SearchResponse<Map> response = esClient.search(s -> s
                .index(index)
                .size(size)
                .query(boolQuery._toQuery())
                .knn(knnQuery)
                .rank(rn->rn.rrf(rrfb->rrfb.rankConstant(20L).windowSize((long) 10))),
                Map.class);

the problem that i have is that response don't contain any field that indicate the rank of the search.
Is this as inteded , so that the rank is the index of the response?

Yes the rank is in order of the response. The rank is also specified in the _rank field. Using RRF, both sets of results are merged into a single result set and ranked accordingly.

One thing to note, we don't provide a score for each result but provide a meta rank field in the response only.

See this doc for more information Reciprocal rank fusion | Elasticsearch Guide [8.13] | Elastic

Joe

Hi, thank you @joemcelroy, of course using rest Api i see that the response also include the rank,
my problem is when i perform the query with co.elastic.clients library in Java, that the response not include the rank field.
Hope I have explained my problem well,
Thanks,

Tommaso

Did you try with a more recent version of the client?
I did not check myself yet but this might have been fixed since then.

Hi @dadoonet, no also in new version of java Library i can't see the rank.
last tested 8.13.3

Thanks,
Tommaso.

Hello! We seem to be missing the field from the client, if you want you can open an issue on our github repo. Thank you for reporting this!