use of org.codelibs.fess.helper.SearchLogHelper in project fess by codelibs.
the class IndexUpdateCallbackImpl method addClickCountField.
protected void addClickCountField(final Map<String, Object> doc, final String url, final String clickCountField) {
final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper();
final int count = searchLogHelper.getClickCount(url);
doc.put(clickCountField, count);
if (logger.isDebugEnabled()) {
logger.debug("Click Count: " + count + ", url: " + url);
}
}
use of org.codelibs.fess.helper.SearchLogHelper in project fess by codelibs.
the class IndexUpdater method addClickCountField.
protected void addClickCountField(final Map<String, Object> doc) {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final String url = (String) doc.get(fessConfig.getIndexFieldUrl());
if (StringUtil.isNotBlank(url)) {
final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper();
final int count = searchLogHelper.getClickCount(url);
doc.put(fessConfig.getIndexFieldClickCount(), count);
if (logger.isDebugEnabled()) {
logger.debug("Click Count: {}, url: {}", count, url);
}
}
}
use of org.codelibs.fess.helper.SearchLogHelper in project fess by codelibs.
the class AggregateLogJob method execute.
public String execute() {
final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper();
final StringBuilder resultBuf = new StringBuilder();
try {
searchLogHelper.storeSearchLog();
} catch (final Exception e) {
logger.error("Failed to store a search log.", e);
resultBuf.append(e.getMessage()).append("\n");
}
return resultBuf.toString();
}
Aggregations