Closed orhantoy closed 2 years ago
* Daily sync job to make sure the Elasticsearch index is in sync with the database.
I'm curious about this point. Is that current best practice? I have previously used elasticsearch in a way that updates the index on every create, update, delete.
@Midnighter That's also what is described here
Ingest data into index
- Update when updated in DB
- Create when created in DB
- Delete when deleted in DB
and that approach should be enough if there are retries (in case of failures while making requests to Elasticsearch). If there is a lack of retrying, a daily sync job would be a "nice to have", depending on how critical it is.
This follows up on https://github.com/HackYourFuture-CPH/simply-name.it/issues/79 to integrate with Elasticsearch to deliver a more powerful search experience.
The overall steps needed to integrate with Elasticsearch are:
Note: the above steps could be further split into individual GitHub issues and this issue here could serve as a kind of parent issue.
Setup index
Example mapping:
Docs Example
Search
Example search query:
Links
Enhancement ideas