Fetching filtered and unfiltered count in a single request

Hi,

I have a use case where a user_id has multiple records in Elasticsearch. I'm using a bool query on user_id and additional filters on top of it.

I'm able to fetch the count of filtered records using track_total_hits, but I'm also looking for the overall count of records for that user_id.

Is it possible to form a single query to fetch both of these (track_total_hits and total record on user_id).

Thanks

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