Expose the total hit count in scroll results

Description

Elasticsearch apparently returns the total hit count even for scrolls, so we probably should do this as well.

Maybe we could add a method, e.g. SearchResultTotal total(), to SearchScrollResult?

We would lose the "totalHitCountThreshold" optimization that we apply by default, but that's not a big deal as users who need it can still apply it explicitly (and deal with the approximate total hit count).

For reference: https://discourse.hibernate.org/t/totalhitcount-for-scrolling-hibernate-search-beta-10/4633

Environment

None
Fixed

Assignee

Fabio Massimo Ercoli

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Fix versions

Priority

Major
Configure