Describe the issue:
We are migrating from ElasticSearch-7.X to Opensearch-2.4.1 and we were using RLIKE operator in SQL query for RegularExpression matching.
But looks now RLIKE operator has been dropped from OpenSearch and OpenSearch Application is throwing Error while running SQL query with RLIKE operator.
Do we have RLIKE operator support in SQL query, or we can use any other replacement operator to be used?
"query": "SELECT identifier FROM `2` WHERE companyName = 'test1' AND containerName = 'car_catalog' AND ((`attributes.car_specs.item_name` RLIKE '[a-z]')) LIMIT 10000 "
Hi @daichen , We had tried with REGEX operator as below. but opensearch query is not working.
the attributes.cat_specs.item_description is of string type
Could you suggest any change.
Request payload:
{ âqueryâ: âSELECT count(*) FROM `66` WHERE companyName = âdevsanityâ AND containerName = âcatalogâ AND ((`attributes.cat_specs.item_description` REGEXP â[a-z]â))â
} Response body:
{
âerrorâ: {
âreasonâ: âInvalid SQL queryâ,
âdetailsâ: âand function expected {[BOOLEAN,BOOLEAN]}, but get [BOOLEAN,INTEGER]â,
âtypeâ: âExpressionEvaluationExceptionâ
},
âstatusâ: 400
}