Is there a SIMILAR TO in Elasticsearch SQL?

Hi, I want to match several values in a Elasticsearch SQL query, is there something like "SIMILAR TO" to do this?

WHERE items SIMILAR TO 'CPU Porcentual|CPU Utilization'

You could run WHERE items LIKE 'CPU%' or WHERE items = 'CPU Porcentual' OR items = 'CPU Utilization' or you could have a look at the MATCH function too.

1 Like

or use IN:
WHERE items IN (`CPU Porcentual', 'CPU Utilization')

Keep in mind that exact matches with = and OR or IN are faster than funtions/operators as LIKE, MATCH, etc.

If you want something more complicated check out also QUERY function.

1 Like

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