On Wed, Apr 17, 2013 at 8:10 AM, Ashish Sarna <ashish.sa...@thepsi.com> wrote:
> The external backup utility would be used by some other person and it would
> simply copy the index directory to take its backup. I have no control over
> this utility.

OK.

> I have ensured that nothing would be written to index before the backup
> utility is executed and now just need to ensure that it does not get changed
> due to searches and or Lucene housekeeping activities.
>
> Is there a way to ensure this?

Safest is to close the IndexWriter.

But you could probably get away with 1) stopping all indexing actions,
2) commit, 3) IndexWriter.waitForMerges and only once that returns, do
the full backup.

> Does using the IndexReader.open method with 'readOnly' flag passed as 'true'
> would help keeping the indexes from modifying when a search is performed?

No, how an IndexReader is opened on the index won't alter what
IndexWriter is doing to it.

Mike McCandless

http://blog.mikemccandless.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to