use of org.apache.solr.update.CommitUpdateCommand in project SearchServices by Alfresco.
the class SolrInformationServer method commit.
@Override
public void commit() throws IOException {
// avoid multiple commits and warming searchers
commitAndRollbackLock.writeLock().lock();
try {
canUpdate();
SolrQueryRequest request = null;
UpdateRequestProcessor processor = null;
try {
request = getLocalSolrQueryRequest();
processor = this.core.getUpdateProcessingChain(null).createProcessor(request, new SolrQueryResponse());
processor.processCommit(new CommitUpdateCommand(request, false));
} finally {
if (processor != null) {
processor.finish();
}
if (request != null) {
request.close();
}
}
} finally {
commitAndRollbackLock.writeLock().unlock();
}
}
Aggregations