babenkoivan / elastic-migrations

Elasticsearch migrations for Laravel
MIT License
189 stars 32 forks source link

Zero Downtime Migration #41

Closed ybert closed 2 years ago

ybert commented 2 years ago

Hello @babenkoivan ,

In your old package for scout, you made an incredible work for zero downtime migration. I used it for years and it worked perfectly. The good point was to start writing to new index with an alias with suffix _write while still searching in old index.

My re indexing is heavy and it can take hours. With the new way you documented on this package, old index continue indexing new incoming documents. So when the import finished, we don't have these documents created by users in the new index.

I don't know how we can do it the old way (Indexing new documents to the new index while searching in the old, and then switch searching creating a new alias). Do you know if this is possible ?

babenkoivan commented 2 years ago

Hey @ybert, thank you for the feedback! I need to update the documentation, it is now possible to use the is_write_index option when creating an alias to forward all writing operations to a specific index. I'll try it out and update the docs as soon as I finish with other tasks.

codelinde commented 2 years ago

@babenkoivan Thanks for pointing out the availability of the is_write_index option--I'm going to give this a shot myself 😸

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days