convert SQL-like queries to Elasticsearch commands