Search in sources :

Example 1 with ClickLogBhv

use of org.codelibs.fess.es.log.exbhv.ClickLogBhv in project fess by codelibs.

the class SearchLogHelper method processClickLog.

protected void processClickLog(final List<ClickLog> clickLogList) {
    if (!clickLogList.isEmpty()) {
        final FessConfig fessConfig = ComponentUtil.getFessConfig();
        try {
            final ClickLogBhv clickLogBhv = ComponentUtil.getComponent(ClickLogBhv.class);
            clickLogBhv.batchInsert(clickLogList);
        } catch (final Exception e) {
            logger.warn("Failed to insert: {}", clickLogList, e);
        }
        if (fessConfig.isLoggingSearchUseLogfile()) {
            clickLogList.forEach(this::writeSearchLogEvent);
        }
    }
}
Also used : ClickLogBhv(org.codelibs.fess.es.log.exbhv.ClickLogBhv) FessConfig(org.codelibs.fess.mylasta.direction.FessConfig) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) ExecutionException(java.util.concurrent.ExecutionException)

Aggregations

JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ExecutionException (java.util.concurrent.ExecutionException)1 ClickLogBhv (org.codelibs.fess.es.log.exbhv.ClickLogBhv)1 FessConfig (org.codelibs.fess.mylasta.direction.FessConfig)1