You mean on calling IndexWriter.close, with a deletion policy that's functionally equivalent to KeepOnlyLastCommitDeletionPolicy, you somehow see that last 2 commits remaining in the Directory once IndexWriter is done closing? That's odd. Are you sure "onCommit()" is really calling delete() on all the IndexCommits except the last one?

Can you post the source for the deletion policy?

Mike

Shalin Shekhar Mangar wrote:

Hello,

In Solr, when a user calls commit, the IndexWriter is closed (causing a commit). It is opened again only when another document is added or, a delete
is performed. In order to support replication, Solr trunk now uses a
deletion policy. The default policy is (should be?) equivalent to
KeepOnlyLastCommitDeletionPolicy.

However, once a commit is performed, we see that the last two commit points are being kept back. The 2nd last one is cleaned up once the IndexWriter is opened again. It'd be great if someone can suggest on what we might be doing wrong. For the time being, we can work around this by using IW.commit and
keeping the IW open.

--
Regards,
Shalin Shekhar Mangar.


---------------------------------------------------------------------
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