版本: 7.12-8.6
简而言之,当Elasticsearch由于其限制而无法评估复杂的模式集时,就会发生此错误。这通常发生在索引模式中存在过多通配符表达式时。要解决此问题,您可以通过减少通配符数量或将查询拆分为多个更简单的查询来简化模式。或者,您可以增加Elasticsearch配置中的max_determinized_states设置,但要谨慎,因为这可能会消耗更多的内存和CPU资源。
日志上下文 #
日志"The set of patterns [{}] is too complex to evaluate"的类名是 StringMatcher.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
LOGGER.debug("Pattern automaton [{}] is too complex"; patterns);
String description = Strings.collectionToCommaDelimitedString(patterns);
if (description.length() > 80) {
description = Strings.cleanTruncate(description; 80) + "...";
}
throw new ElasticsearchSecurityException("The set of patterns [{}] is too complex to evaluate"; e; description);
}
}
}
}





