+ else if (!strcmp (arg, "commit"))
+ {
+ zebraIndexLock (1);
+ rval = res_get (common_resource, "commitEnable");
+ if (rval && atoi (rval))
+ bf_cache (1);
+
+ if (bf_commitExists ())
+ {
+ logf (LOG_LOG, "Commit start");
+ zebraIndexLockMsg ("c");
+ zebraIndexWait (1);
+ logf (LOG_LOG, "Commit execute");
+ bf_commitExec ();
+ zebraIndexLockMsg ("d");
+ zebraIndexWait (0);
+ logf (LOG_LOG, "Commit clean");
+ bf_commitClean ();
+ }
+ else
+ logf (LOG_LOG, "Nothing to commit");
+ }
+ else if (!strcmp (arg, "stat") || !strcmp (arg, "status"))
+ {
+ zebraIndexLock (0);
+ bf_cache (0);
+ rec_prstat ();
+ }
+ else if (!strcmp (arg, "cstat") || !strcmp (arg, "cstatus"))
+ {
+ zebraIndexLock (1);
+ rval = res_get (common_resource, "commitEnable");
+ if (rval && atoi(rval))
+ {
+ bf_cache (1);
+ zebraIndexLockMsg ("r");
+ }
+ rec_prstat ();
+ }