Disable commitWithin when running Reindex

Disable the 'commitWithin' from within Reindex by overriding
the configuration with '-1'. Treat negative values as the
original behavior, auto-flushing but not auto-committing, which
is the least safe but the most efficient for reindexing the
entire site. 

Change-Id: Ifdba797bee871d2a3d8928810a6304bacb850c8c
This commit is contained in:
Bruce Zu
2014-03-21 10:03:05 +08:00
committed by David Pursehouse
parent 3daa739e13
commit af058e6dd3
5 changed files with 64 additions and 48 deletions

View File

@@ -207,6 +207,10 @@ public class ConfigUtil {
return defaultValue;
}
if (s.startsWith("-")/* negative */) {
throw notTimeUnit(section, subsection, setting, valueString);
}
try {
return getTimeUnit(s, defaultValue, wantUnit);
} catch (IllegalArgumentException notTime) {