Skip to content

Totalhits support for ReactiveSearchOperations #2015

Closed
@aleksanderlech

Description

@aleksanderlech

Hello,

I need to have total count while searching and would like to avoid making two searches in Elasticsearch.
For non-reactive version of SearchOperations I could use the following method:

<T> SearchHits<T> search(Query query, Class<T> clazz);

But I miss the corresponding method in ReactiveSearchOperations. It would be very convenient to have something similar in ReactiveSearchOperations like:

<T> ReactiveSearchHits<T> search(Query query, Class<T> clazz);

where the ReactiveSearchHits is a reactive version of SearchHits returning Flux instead of List.

Is this possible to deliver such an API or are there any alternative ways for doing that in the reactive world?

I am using Spring Boot 2.5.6 with Spring Data ElasticSearch 4.0.4. Thank you in advance for your help!

Metadata

Metadata

Assignees

Labels

status: worked ona contributor is working on this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions