I have a question about storing new documents in an indexed that is being restored. Is such a thing possible? My use case is that we have a large index that will be restored, but upon restoring the index we have a different process that will periodically insert new documents into that index as well. I can't figure out via the documentation if the index that is being restored is being set to read-only for example or not.
If anyone has input on this, it would be much appreciated!
Restoring an index from snapshot works on a shard-by-shard basis and, for each shard, takes place entirely before the primary of that shard is started. You cannot write to a shard (or search it) before its primary is started. Attempts to do so will wait for the shard to start, up to 60 seconds by default I think, and then fail. However, because the shards are all restored independently it may be possible to write to some of the shards before the others are started.
I think you can yourself set the whole index to be read-only when you start the restore process by including "index.blocks.read_only":true in the index settings. Once the whole index has been restored you can then remove this block to allow writes.
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.