Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always use Index API for updates #526

Merged
merged 6 commits into from
Jan 3, 2021
Merged

Conversation

lonvia
Copy link
Collaborator

@lonvia lonvia commented Jan 2, 2021

The Update API merges the given document with an existing one. We need to completely replace the document, which is done via the Index API.

Also adds tests for the case where a name is removed which confirms the issue. To make it easier to write these tests I've changed PhotonDoc to a builder pattern to get rid of the rather uncomfortably long constructor. See separate commits for details.

Fixes #525.

Instead of creating one-size-fits all content for the test ES DB,
have each test create the data it needs.
Removes the constructor with far too many parameters and makes
it easier to construct PhotonDocs for testing.
Very simple tests to confirm a bug with the update code.
The Update API merges the given document with an existing one. We
need to completely replace the document, which is done via the
Index API.

Fixes komoot#525.
@lonvia lonvia merged commit 481b2e8 into komoot:master Jan 3, 2021
@lonvia lonvia deleted the test-updates branch March 18, 2021 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating documents in the ElasticSearch database
1 participant