<small id='Q2uD9'></small><noframes id='Q2uD9'>

<legend id='Q2uD9'><style id='Q2uD9'><dir id='Q2uD9'><q id='Q2uD9'></q></dir></style></legend>

<i id='Q2uD9'><tr id='Q2uD9'><dt id='Q2uD9'><q id='Q2uD9'><span id='Q2uD9'><b id='Q2uD9'><form id='Q2uD9'><ins id='Q2uD9'></ins><ul id='Q2uD9'></ul><sub id='Q2uD9'></sub></form><legend id='Q2uD9'></legend><bdo id='Q2uD9'><pre id='Q2uD9'><center id='Q2uD9'></center></pre></bdo></b><th id='Q2uD9'></th></span></q></dt></tr></i><div id='Q2uD9'><tfoot id='Q2uD9'></tfoot><dl id='Q2uD9'><fieldset id='Q2uD9'></fieldset></dl></div>
      <bdo id='Q2uD9'></bdo><ul id='Q2uD9'></ul>
  • <tfoot id='Q2uD9'></tfoot>

      1. Lucene 索引备份

        时间:2023-09-30
          <tbody id='otGXh'></tbody>
        1. <small id='otGXh'></small><noframes id='otGXh'>

          • <i id='otGXh'><tr id='otGXh'><dt id='otGXh'><q id='otGXh'><span id='otGXh'><b id='otGXh'><form id='otGXh'><ins id='otGXh'></ins><ul id='otGXh'></ul><sub id='otGXh'></sub></form><legend id='otGXh'></legend><bdo id='otGXh'><pre id='otGXh'><center id='otGXh'></center></pre></bdo></b><th id='otGXh'></th></span></q></dt></tr></i><div id='otGXh'><tfoot id='otGXh'></tfoot><dl id='otGXh'><fieldset id='otGXh'></fieldset></dl></div>
          • <tfoot id='otGXh'></tfoot>

              <legend id='otGXh'><style id='otGXh'><dir id='otGXh'><q id='otGXh'></q></dir></style></legend>

                • <bdo id='otGXh'></bdo><ul id='otGXh'></ul>

                  本文介绍了Lucene 索引备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  在不使索引脱机(热备份)的情况下备份 lucene 索引的最佳做法是什么?

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

                  推荐答案

                  您不必为了备份索引而停止 IndexWriter.

                  You don't have to stop your IndexWriter in order to take a backup of the index.

                  只需使用 SnapshotDeletionPolicy,它可以让您保护"给定的提交点(及其包含的所有文件)不被删除.然后,将该提交点中的文件复制到您的备份,最后释放提交.

                  Just use the SnapshotDeletionPolicy, which lets you "protect" a given commit point (and all files it includes) from being deleted. Then, copy the files in that commit point to your backup, and finally release the commit.

                  如果备份需要一段时间才能运行,这很好——只要您不使用 SnapshotDeletionPolicy 释放提交点,IndexWriter 就不会删除文件(例如,即使它们已经合并在一起).

                  It's fine if the backup takes a while to run -- as long as you don't release the commit point with SnapshotDeletionPolicy, the IndexWriter will not delete the files (even if, eg, they have since been merged together).

                  这为您提供了一致的备份,它是索引的时间点映像,不会阻塞正在进行的索引.

                  This gives you a consistent backup which is a point-in-time image of the index without blocking ongoing indexing.

                  我在 Lucene in Action(第 2 版)中对此进行了介绍,并且有从 http://提供(免费)的书中摘录的论文www.manning.com/hatcher3,使用 Lucene 进行热备份",对此进行了更详细的描述.

                  I wrote about this in Lucene in Action (2nd edition), and there's paper excerpted from the book available (free) from http://www.manning.com/hatcher3, "Hot Backups with Lucene", that describes this in more detail.

                  这篇关于Lucene 索引备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何使用 Lucene 获取频繁出现的短语 下一篇:如何计算一组文档的词频?

                  相关文章

                  最新文章

                  <i id='EXs1e'><tr id='EXs1e'><dt id='EXs1e'><q id='EXs1e'><span id='EXs1e'><b id='EXs1e'><form id='EXs1e'><ins id='EXs1e'></ins><ul id='EXs1e'></ul><sub id='EXs1e'></sub></form><legend id='EXs1e'></legend><bdo id='EXs1e'><pre id='EXs1e'><center id='EXs1e'></center></pre></bdo></b><th id='EXs1e'></th></span></q></dt></tr></i><div id='EXs1e'><tfoot id='EXs1e'></tfoot><dl id='EXs1e'><fieldset id='EXs1e'></fieldset></dl></div>
                    <bdo id='EXs1e'></bdo><ul id='EXs1e'></ul>

                • <small id='EXs1e'></small><noframes id='EXs1e'>

                      <tfoot id='EXs1e'></tfoot>
                    1. <legend id='EXs1e'><style id='EXs1e'><dir id='EXs1e'><q id='EXs1e'></q></dir></style></legend>