I know that until the refresh_interval of a specific index passes, the docs are not searchable.
But what happens if during that time until the interval, the node dies? Does the replica also holds the same in-memory docs that are stored until the refresh_interval is reached, and will it be able to continue from the same position? Or are those documents lost?
The way that elasticsearch prevents documents lost before refresh is translog. You can learn more from here.
The primary and replica handle documents by themselves. It means that the in-memory docs might be different at the same time but finally it'll be the same.
So if I set refresh_interval to 10m, and the primary node for the index goes down after 5m, the docs that were indexed during those 5m will still exist
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.