Hi all,
I was digging into what exactly expungeDeletes means, and what it would during
during an <optimize/> call. From my reading of the docs:
http://lucene.apache.org/java/2_9_3/api/core/org/apache/lucene/index/IndexWriter.html#expungeDeletes()
we should either do an optimize or an expungeDeletes, but don't need to do
both. While DUH has this behavior:
if(cmd.optimize) writer.optimize(cmd.maxOptimizeSegments);
if(cmd.expungeDeletes) writer.expungeDeletes(cmd.expungeDeletes);
It seems like DUH2 behaves the way I expected:
if (cmd.optimize) {
openWriter();
writer.optimize(cmd.maxOptimizeSegments);
} else if (cmd.expungeDeletes) {
openWriter();
writer.expungeDeletes();
}
So would it make sense to update the wiki page to say the expungeDeletes only
makes sense as a commit parameter, not an optimize parameter?
Eric
-----------------------------------------------------
Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 |
http://www.opensourceconnections.com
Co-Author: Solr 1.4 Enterprise Search Server available from
http://www.packtpub.com/solr-1-4-enterprise-search-server
Free/Busy: http://tinyurl.com/eric-cal
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]