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

🐝 Add the ability to prefix algolia index names #3337

Merged
merged 5 commits into from
Mar 18, 2024

Conversation

larsyencken
Copy link
Contributor

@larsyencken larsyencken commented Mar 13, 2024

This PR introduces two changes to make it easier to experiment with changes to Algolia.

ALGOLIA_INDEX_PREFIX setting

The ALGOLIA_INDEX_PREFIX setting prepends a prefix to all index names.

E.g. ALGOLIA_INDEX_PREFIX=dev-lars will cause dev-lars-pages, dev-lars-charts and dev-lars-explorers to be used

make reindex

Refreshes Algolia search indexes, creating them if they're missing, including updating any index settings that have changed.

Requires ALGOLIA_ID and ALGOLIA_SECRET_KEY, plus ALGOLIA_INDEXING=true.

See: https://github.com/owid/ops/issues/158

Copy link
Contributor

@danyx23 danyx23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only looked at the query part - thanks for cleaning that up as you pass it by :)

baker/algolia/indexExplorersToAlgolia.ts Outdated Show resolved Hide resolved
baker/algolia/indexExplorersToAlgolia.ts Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
This is in order to support multiple staging servers having their own
index inside one Algolia staging application.
@larsyencken larsyencken force-pushed the prefixed-algolia-index branch 2 times, most recently from 21225d0 to c158491 Compare March 15, 2024 11:59
@larsyencken larsyencken marked this pull request as ready for review March 15, 2024 12:00
@marcelgerber marcelgerber self-requested a review March 18, 2024 08:30
.env.example-full Outdated Show resolved Hide resolved
.env.example-full Outdated Show resolved Hide resolved
@larsyencken larsyencken force-pushed the prefixed-algolia-index branch from 24eb1ec to 67b0a75 Compare March 18, 2024 11:30
@larsyencken larsyencken merged commit a8fd7ad into master Mar 18, 2024
13 of 16 checks passed
@larsyencken larsyencken deleted the prefixed-algolia-index branch March 18, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants