You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello,
currently when I do Model.import (elasticsearch-model), the whole index will be wiped out and then rewritten. this method is not an option when the system is live. I would need to shutdown all clients somehow before doing the import.
because of this I would propose to implement a zero downtime method like searchkick did (see https://github.com/ankane/searchkick/blob/master/lib/searchkick/index.rb#L151). their method Model.reindex calls the method reindex_scope which creates a new index with the current timestamp as a suffix, fills this index, and then changes the index alias to this newly created index.
what do you think?
The text was updated successfully, but these errors were encountered:
There's probably an issue opened for that already... I'm not sure how much "magic" to provide, because:
(...) the whole index will be wiped out and then rewritten (...)
Not really -- the method is much more flexible and allows to (re)index into a completely different index. Then it's mostly a matter of setting up aliases and so on so everything adds up.
I think #234 is related.
I can't find anything about managing aliases in the elasticsearch-rails documentation.
from my perspective, implementing this "magic" has great value. it is even recommended by the elastic blog itself https://www.elastic.co/blog/changing-mapping-with-zero-downtime
hello,
currently when I do Model.import (elasticsearch-model), the whole index will be wiped out and then rewritten. this method is not an option when the system is live. I would need to shutdown all clients somehow before doing the import.
because of this I would propose to implement a zero downtime method like searchkick did (see https://github.com/ankane/searchkick/blob/master/lib/searchkick/index.rb#L151). their method Model.reindex calls the method reindex_scope which creates a new index with the current timestamp as a suffix, fills this index, and then changes the index alias to this newly created index.
what do you think?
The text was updated successfully, but these errors were encountered: