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'
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.
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.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.