This was needed because Elasticsearch now includes a performance improvement that allows non-exact hit counts to be used when the exact count isn't needed.
This PR adds a helper to wrap around the breaking change and support either the old or new format.
In Elasticsearch 7+, the hits count is now an object.
This was needed because Elasticsearch now includes a performance improvement that allows non-exact hit counts to be used when the exact count isn't needed.
This PR adds a helper to wrap around the breaking change and support either the old or new format.
Extracted from https://github.com/pelias/schema/pull/394 Connects https://github.com/pelias/pelias/issues/831