pelias / schema

elasticsearch schema files and tooling
MIT License
40 stars 76 forks source link

feat(integration): Add total hits helper #417

Closed orangejulius closed 4 years ago

orangejulius commented 4 years ago

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