IndexLocation actualLocation = callingIndexLocation;
if (indexLocation != null) {
actualLocation = indexLocation;
}
if (REINDEX_JOB.equalsIgnoreCase(name)) {
AbstractUpdateCheckerJob job = (AbstractUpdateCheckerJob) new AutocompleteIndexJob(this.config,
actualLocation, this);
actualLocation.getQueue().addJob(job);
} else if (CLEAR_JOB.equalsIgnoreCase(name)) {
AbstractUpdateCheckerJob job = (AbstractUpdateCheckerJob) new AutocompleteIndexDeleteJob(this.config,
actualLocation, this);
actualLocation.getQueue().addJob(job);
} else {
throw new NoSuchMethodException("No Job-Method by the name: " + name);
}