SQL to Lucene Query conversion

Hi All,

We are using Elastic Search, we want to expose our search service using SQL
type inteface.

Is any tool are available, which can convert SQL into lucene?

For example:
Input : select * from tableName where id = 1 and pn=2

Output: lucene query

Thanks,
Ankit Jain

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Not that I know. Probably not the best idea to want to do this to begin
with. But you can sort of fake it for simple queries. The above query you
could do with a filter query that filters on a boolean of two term queries.
Or if you want to use the lucene query language syntax: "id:1 AND pn:2".
However the way that works is actually kind of the way you set up your
mappings and analyzers.

Things like joins get a lot more tricky and you probably end up doing
things you shouldn't be doing if you go down that path (hint, doing many
subqueries is going to be slow).

Jilles

On Monday, May 6, 2013 1:12:50 PM UTC+2, Ankit Jain wrote:

Hi All,

We are using Elastic Search, we want to expose our search service using
SQL type inteface.

Is any tool are available, which can convert SQL into lucene?

For example:
Input : select * from tableName where id = 1 and pn=2

Output: lucene query

Thanks,
Ankit Jain

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I have the same challenge, take a look at Apache Drill - http://incubator.apache.org/drill/ it appears to be able to query JSON docs natively, just need to invoke API to Elasticsearch.... happy to collaborate with you to get this working, it's sure to be popular.