Index aliases
Hi,
It looks like when using the Aliased interface, it will create aliases but it will not keep both indexes updated. Is it correct that this feature only pushes the updates of a model to 1 index and not all aliases?
Aliases are implemented as a form of zero downtime deployment, so only one index (the latest) is being kept up to date. You can read more here:
https://jeroen-g.github.io/Explorer/index-aliases.html
Thanks for your swift reply. But for zero downtime deployments, they should be kept in sync right? If I do a change, then deploy, the new updates are not visible for the users since the read alias is not pointed to the latest. Or do I misunderstand the concept here?
After the new index is populated the write and read aliases should point to the new one, the old index becomes part of the history and should serve no other purpose.
Are you saying the read alias is not updated? Is it reproducible? And if so, does it stick at the previous or the very first index if there are 3+?
We have the issue that a new alias index is created and all the new updates are written to this new alias. But the read pointer is not yet updated to this new alias since it will take a while to populate the data into the new index (~7.5M records). Once all the records are in the new alias, it will point to the new alias. But during this time, which took about 45 minutes, the read pointer will not get all the new updates.
Hmm that is an interesting case, but given the design also sort of expected. Unless you have a very good idea I don't think I'll change Explorer for it, sorry.
Currently, the getWriteIndexName method returns only the last alias index name. Isn't it possible to just loop through all indices and update them all?
Do you perhaps know an easy way how I can override this myself?
No, the idea is that old indices are history and not updated.
The adapter implements the IndexAdapterInterface, so you can override that interface > class service binding with your own class that changes for example that getWriteIndexName method.