Exact replacement of LIKE with MATCH() / QUERY() in SQL query

Hi!
The documentation suggests to use MATCH()/QUERY() instead of LIKE for performance reasons. I am wondering if it is possible to translate expression from LIKE filter to either MATCH or QUERY in order to achieve exactly the same semantic? At first glance the problem is case insensitive search and the inability to find exact match of a phrase consisting of multiple words.

Thanks for any suggestions!

Best regards,
Grzegorz

Welcome!

That'd help if you share a concrete example of what you have and what you'd like to be able to search for. Like a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Have a look at the https://elastic.co/community/help page. It contains also lot of useful information on how to ask for help.

In general the answer is to "solve" that problem at index time. But let's discuss this when you share more details.

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