Lucene index backup

前端 未结 4 1812
悲哀的现实
悲哀的现实 2020-12-16 13:37

What is the best practice to backup a lucene index without taking the index offline (hot backup)?

4条回答
  •  轮回少年
    2020-12-16 14:09

    Create a new index with a separate IndexWriter and use addIndexesNoOptimize() to merge the running index into the new one. This is very slow, but it allows you keep the original index operational while doing the backup.

    However, you cannot write to the index while merging. So even if it is online and you can query the index, you cannot write to it during the backup.

提交回复
热议问题