Could not parse condition for watch unknown comparison – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.15

Briefly, this error occurs when Elasticsearch is unable to parse a condition in a watch due to an unknown comparison operator. This usually happens when the comparison operator used in the watch condition is not recognized by Elasticsearch. To resolve this issue, you should first verify the syntax of your watch condition. Make sure you are using a valid comparison operator that Elasticsearch recognizes. If the syntax is correct, check if the Elasticsearch version you are using supports the operator. If not, you may need to upgrade your Elasticsearch version or use a different operator.

This guide will help you check for common problems that cause the log ” could not parse [{}] condition for watch [{}]. unknown comparison ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “could not parse [{}] condition for watch [{}]. unknown comparison” class name is ArrayCompareCondition.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 path = parser.text();
 } else {
 try {
 op = Op.resolve(parser.currentName());
 } catch (IllegalArgumentException iae) {
 throw new ElasticsearchParseException("could not parse [{}] condition for watch [{}]. unknown comparison " +
 "operator [{}]"; TYPE; watchId; parser.currentName(); iae);
 }
 token = parser.nextToken();
 if (token == XContentParser.Token.START_OBJECT) {
 while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {

 

 [ratemypost]