[email protected]
[Top] [All Lists]

Re: How can we know if 2 lucene indexes are same?

Subject: Re: How can we know if 2 lucene indexes are same?
From: Michael McCandless
Date: Thu, 4 Sep 2008 05:20:40 -0400

Actually, as of 2.3, this is no longer true: merges and optimizing run in the background, and allow add/update/delete documents to run at the same time.

I think it's probably best to use application logic (outside of Lucene) to keep track of what updates happened to the master while the slave was optimizing.


ååæ wrote:

No documents can added into index when the index is optimizing,  or
optimizing can't run durling documents adding to the index.
So, without other error, I think we can beleive the two index are indeed the


2008/9/4 Noble Paul ààààààâ àààààà <[email protected]>

The use case is as follows

I have two indexes . One at the master and one at the slave. The user
occasionally keeps committing on the master and the delta is
replicated everytime. But when the optimize happens the transfer size
can be really large. So I am thinking of  doing the optimize
separately on master and slave .

So far, so good. But how can I really know that after the optimize the
indexes are indeed the same or no documents got added in between.?

On Fri, Aug 29, 2008 at 3:13 PM, Karl Wettin <[email protected]>

29 aug 2008 kl. 11.35 skrev Noble Paul ààààààâ àààààà:

I wish to know if the contents of two indexes have same data.
will all the files be exactly same if I put same set of documents to

If you insert the documents in the same order with the same settings and both indices are optimized, then the files ought to be identitical. I'm
however not sure.

The instantiated index contrib module contains a test that assert two
readers are identical. You could use this to be really sure, but it it a
rather long running process for a large index:


Perhaps you should explain why you need to do this.

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

--Noble Paul

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>