Cannot query by phrase

I am trying to write a query against AWS ElasticSearch that matches by a phrase

SELECT * FROM myIndex WHERE [text] LIKE ‘%automotive supplies%’

but I returns zero hits.

How do I match by a phrase in SQL?


LIKE is being translanted to ElasticDSL wildcard query, so you need to use the following syntax:

POST _opendistro/_sql
  "query": """SELECT * 
    from kibana_sample_data_flights
    WHERE OriginCityName LIKE '*Frankfurt*'