Facing the cause "cannot evaluate script for expression StringQueryPredicate"

Elasticsearch version - 6.6.0
JVM version -1.8
OS version window server 2012 R2

I am running the below query using the xpack api
"query":"Select role as "role" , sum(customerincome ) as "sum_customerincome" FROM message_index where (Query('role:Son') OR Query('role:Wife')) GROUP BY role"

but facing the below error,

"root_cause": [
"type": "sql_illegal_argument_exception",
"reason": "Cannot evaluate script for expression StringQueryPredicate[role :Son,]"

please advice.

Hi @shubham-agarwal-ngi,
The ES version you are using is rather old from SQL point of view (SQL went GA with ES 6.7.0). Many features and bug fixes went in it since 6.6.0. Would you be able to upgrade and try the query on a newer/newest version?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.