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

Update index mappings and settings on startup #583

Merged
merged 3 commits into from
Jun 4, 2021

Conversation

lonvia
Copy link
Collaborator

@lonvia lonvia commented Jun 1, 2021

Now that there is some versioning of the database, we can safely update the index settings and mappings on startup of the Photon server. This allows to use the same database dump for different versions of Photon that might use different search analyzers. The synonym analyser in #581 already applied a similar tactics.

I've added some hints for developers in CONTRIBUTING.md how to handle settings and mapping changes.

lonvia added 3 commits June 1, 2021 10:02
Introduces a new class which encapsulate loading and applying
the index settings. Adds new functionality to update the
settings.
Factors out the code for loading the index mapping in its own class.
Adds code to reload the mapping when Photon is started as a server.

Also adds tests that the custom languages are applied and hints
how to modify index settings and mappings.
Databases without the global property document have no information
about the languages used on initial import, so there is no way to
reproduce the original mapping correctly.
@lonvia lonvia merged commit 5a62f4e into komoot:master Jun 4, 2021
@lonvia lonvia deleted the update-settings-on-startup branch June 4, 2021 13:12
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.

1 participant