use of org.apache.solr.update.UpdateHandler in project lucene-solr by apache.
the class SolrCore method initUpdateHandler.
private UpdateHandler initUpdateHandler(UpdateHandler updateHandler) {
String updateHandlerClass = solrConfig.getUpdateHandlerInfo().className;
if (updateHandlerClass == null) {
updateHandlerClass = DirectUpdateHandler2.class.getName();
}
final UpdateHandler newUpdateHandler;
if (updateHandler == null) {
newUpdateHandler = createUpdateHandler(updateHandlerClass);
} else {
newUpdateHandler = createUpdateHandler(updateHandlerClass, updateHandler);
}
if (newUpdateHandler instanceof SolrMetricProducer) {
coreMetricManager.registerMetricProducer("updateHandler", (SolrMetricProducer) newUpdateHandler);
}
infoRegistry.put("updateHandler", newUpdateHandler);
return newUpdateHandler;
}
Aggregations