Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

ElasticSearch 7 compatibility #615

Merged
merged 7 commits into from
Jun 26, 2021
Merged

ElasticSearch 7 compatibility #615

merged 7 commits into from
Jun 26, 2021

Conversation

patrickvenetz
Copy link
Contributor

@patrickvenetz patrickvenetz commented Jun 24, 2021

This Pull Request allows us to use ElasticSearch 7.

Major change: In ElasticSearch 6, hits.total is an integer. In ElasticSearch 7, hits.total is an object, returning document count as value and relation of count. We use track_total_hits flag to get an accurate (but "costly") document count.

Bugfix: We may have passed a filter array containing objects and arrays with objects. While ElasticSearch prior to version 7 was lenient on this, version 7 isn't anymore and will throw a parsing exception.

Fixes #616

@patrickvenetz patrickvenetz temporarily deployed to republik-api-staging June 24, 2021 12:40 Inactive
@patrickvenetz patrickvenetz temporarily deployed to republik-api-staging June 25, 2021 05:19 Inactive
An actual bug. Filter object may have contained objects and arrays with objects.

While ES 6.8 was lenient on this, ES 7 is no more.
- Bump elasticsearch package
- Handle .hits.total change
@patrickvenetz patrickvenetz temporarily deployed to republik-api-staging June 25, 2021 06:24 Inactive
track_total_hits will get an accurate (but "costly") document count.
@patrickvenetz patrickvenetz temporarily deployed to republik-api-staging June 25, 2021 07:22 Inactive
@patrickvenetz patrickvenetz marked this pull request as ready for review June 26, 2021 12:20
@patrickvenetz patrickvenetz merged commit 09834a0 into master Jun 26, 2021
@patrickvenetz patrickvenetz deleted the pae/feat-es7-compat branch June 26, 2021 12:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated field [exclude] used, expected [excludes] instead
1 participant