List of usage examples for org.apache.solr.update UpdateLog TLOG_NAME
String TLOG_NAME
To view the source code for org.apache.solr.update UpdateLog TLOG_NAME.
Click Source Link
From source file:jp.sf.fess.solr.plugin.update.SuggestTranslogUpdateHandlerFilter.java
License:Apache License
@Override public void commit(final CommitUpdateCommand cmd, final UpdateHandlerFilterChain chain) throws IOException { final UpdateLog ulog = updateHandler.getUpdateLog(); final File logDir = new File(ulog.getLogDir()); final long lastLogId = ulog.getLastLogId(); final String lastLogName = String.format(Locale.ROOT, UpdateLog.LOG_FILENAME_PATTERN, UpdateLog.TLOG_NAME, lastLogId);//from w ww .j a va 2 s .c o m chain.commit(cmd); final File logFile = new File(logDir, lastLogName); if (logFile.exists()) { if (logger.isInfoEnabled()) { logger.info("Create " + logFile.getAbsolutePath()); } suggestUpdateController.addTransactionLog(logFile); } else { if (logger.isInfoEnabled()) { logger.info(logFile.getName() + " does not exist."); } } }