I am afraid this is not (yet?) supported (see SELECT). The full power of Elaticsearch is really only exposed via the Elasticsearch Query DSL. Also, I wouldn't bet on the fact that this will change anytime soon. Even though it is possible to use an SQL-like query syntax in a number of cases, Elasticsearch is not an SQL database and thus it will not be able to support all SQL operators.
Yeah, totally understand. i think for those fields which are list-like i'll have to use a combination of SQL and the DSL, which is fine. not as clean as i would have preferred, but that's how it is
Hi @David_Palmer,
The IN statement is on our to-do list, but for the moment you could do the same thing (though, more painful I admit) using a list of multiple OR statements:
SELECT id FROM tbl WHERE id=1 OR id=2 OR id=3;
Also, small note here: if id is really the Elasticsearch _id meta field, we are not exposing that field. At least, not for now (there were discussion about it in the past). You'd need to define your own id field and populate it when indexing the documents.
@Andrei_Stefan -- thank you! Yes i considered this. but ultimately, i just ditched the SQL route and have gone with using the java Builders. While not my first choice, I'm finding them quite easy to work with and can perform all of the functions (obviously) that i need to make these queries dynamic.
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.