fix ignore invalid query in keymatch
@@ -75,6 +75,7 @@ public class KeyMatchHelper {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final Map<String, Map<String, Pair<QueryBuilder, ScoreFunctionBuilder<?>>>> keyMatchQueryMap = new HashMap<>();
getAvailableKeyMatchList().stream().forEach(keyMatch -> {
+ try {
final BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
if (logger.isDebugEnabled()) {
logger.debug("Loading KeyMatch Query: {}, Size: {}", keyMatch.getQuery(), keyMatch.getMaxSize());
@@ -110,6 +111,9 @@ public class KeyMatchHelper {
if (interval > 0) {
ThreadUtil.sleep(interval);
}
+ } catch (final Exception e) {
+ logger.warn("Cannot load {}", keyMatch, e);
+ }
});
this.keyMatchQueryMap = keyMatchQueryMap;
}
