We should be able to do soft commits if the user wants to do this. Following patch makes this dead easy

CommentFileSizeAuthor
#5 1974124-5.patch2.84 KBnick_vh
#2 1974124-2.patch2.49 KBnick_vh
#1 1974124-1.patch2.17 KBnick_vh

Comments

nick_vh’s picture

Status: Active » Needs review
StatusFileSize
new2.17 KB
nick_vh’s picture

StatusFileSize
new2.49 KB

Also appropriate for Solr 1.4 and 3.5. After you are done indexing you might want to do a direct commit to get your content instantly. There are more benefits for Solr 4 here as solr 4 can do a soft commit

nick_vh’s picture

Priority: Normal » Major

Bumping to major as I really want to see this committed.

nick_vh’s picture

+++ b/apachesolr.index.incundefined
@@ -354,6 +354,10 @@ function apachesolr_index_send_to_solr($env_id, array $documents) {
+    $direct_commit = apachesolr_environment_variable_get($env_id, 'apachesolr_direct_commit', FALSE);
+    if ($direct_commit) {
+      $solr->commit();

Move it to the end of the batch process

nick_vh’s picture

StatusFileSize
new2.84 KB

Moved to end of batch process

nick_vh’s picture

Status: Needs review » Patch (to be ported)

Committed. needs backport for 6.x-3.x

nick_vh’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev