use of org.codelibs.fess.es.log.exbhv.SearchFieldLogBhv in project fess by codelibs.
the class SearchLog method getSearchFieldLogList.
public List<SearchFieldLog> getSearchFieldLogList() {
if (searchFieldLogList == null) {
final SearchFieldLogBhv searchFieldLogBhv = ComponentUtil.getComponent(SearchFieldLogBhv.class);
searchFieldLogList = searchFieldLogBhv.selectList(cb -> {
cb.query().setSearchLogId_Equal(getId());
cb.fetchFirst(ComponentUtil.getFessConfig().getPageSearchFieldLogMaxFetchSizeAsInteger());
});
}
return searchFieldLogList;
}
use of org.codelibs.fess.es.log.exbhv.SearchFieldLogBhv in project fess by codelibs.
the class SearchLogHelper method storeSearchLogList.
private void storeSearchLogList(final List<SearchLog> searchLogList) {
final SearchLogBhv searchLogBhv = ComponentUtil.getComponent(SearchLogBhv.class);
final SearchFieldLogBhv searchFieldLogBhv = ComponentUtil.getComponent(SearchFieldLogBhv.class);
searchLogBhv.batchUpdate(searchLogList, op -> {
op.setRefreshPolicy(Constants.TRUE);
});
searchLogList.stream().forEach(searchLog -> {
final List<SearchFieldLog> fieldLogList = new ArrayList<>();
searchLog.getSearchFieldLogList().stream().forEach(fieldLog -> {
fieldLog.setSearchLogId(searchLog.getId());
fieldLogList.add(fieldLog);
});
searchFieldLogBhv.batchInsert(fieldLogList);
});
}
Aggregations