Unknown condition – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 8.8-8.9

Briefly, this error occurs when Elasticsearch encounters an empty condition in a script or query. This could be due to a syntax error or a missing value. To resolve this issue, you can check your scripts or queries for any missing or incorrect conditions. Ensure that all conditions are properly defined and formatted. If you’re using dynamic data, make sure the data source is providing the expected values. Also, consider validating your scripts or queries before running them to catch any potential errors.

This guide will help you check for common problems that cause the log ” Unknown condition: ‘{}’ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: admin, indices.

Log Context

Log “Unknown condition: ‘{}'” class name is RolloverConfiguration.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 } else if (MinDocsCondition.NAME.equals(condition)) {
 valueParser.addMinIndexDocsCondition(value; setting);
 } else if (MinPrimaryShardDocsCondition.NAME.equals(condition)) {
 valueParser.addMinPrimaryShardDocsCondition(value; condition);
 } else {
 throw new SettingsException("Unknown condition: '{}'"; condition);
 return valueParser.getRolloverConfiguration();


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?