Here's a good example:
https://www.elastic.co/guide/en/elasticsearch/guide/current/...
SQL:
SELECT document FROM products WHERE productID = "KDKE-B-9947-#kL5" OR (productID = "JODL-X-1937-#pV7" AND price=30)
ES Query: {
"query" : {
"filtered" : {
"filter" : {
"bool" : {
"should" : [
{ "term" : {"productID" : "KDKE-B-9947-#kL5"}},
{ "bool" : {
"must" : [
{ "term" : {"productID" : "JODL-X-1937-#pV7"}},
{ "term" : {"price" : 30}}
]
}}
]
}
}
}
}
}Its a lot easier to become familiar with a new SQL dialect than a new query language, especially since a lot of basic querying will be the same between different dialects.
This makes code you wrote in two different engines with the same syntax run vastly differently.
Only if you are writing basic queries is the ansi sql promise realized.
Sure, but simple queries, like the poster above provides as an example, have been standardized for like decades, and work the same across pretty much every credible RDBMS.
I've been working with ES for years now. the query language changes about twice per year, things which used to be the only way to do things become deprecated. (see: https://www.elastic.co/guide/en/elasticsearch/reference/curr... )
Even if you do understand 100% of the idiosyncrasies of elasticsearch, you still need to construct horrifically nested JSON to do meaningful queries... making it annoying to do in code, but mind wrenching to debug with curl.