SELECT visit.app.appVersion FROM index WHERE visit.app.appName IN ('appA', 'appB')
returns
{
"error": {
"root_cause": [
{
"type": "sql_illegal_argument_exception",
"reason": "Don't know how to translate In In[visit.app.appName{f}#15620,[appA, appB]]"
}
],
"type": "sql_illegal_argument_exception",
"reason": "Don't know how to translate In In[visit.app.appName{f}#15620,[appA, appB]]"
},
"status": 500
}
Seems like xpack/sql should know how to handle a terms query. Can anyone explain how to do this without breaking the original SQL query into multiples?
This seems like it should be pretty basic functionality
WHERE visit.app.appName IN ('appA', 'appB')
should translate into something like:
terms: {visit.app.appName: [appA, appB]}
I should NOT have to do something like:
WHERE visit.app.appName = appA OR visit.app.appName = appB
I am fairly sure that something like this would have been (should have been) implemented, especially since the ES_DSL supports checking for multiple terms in one field.
I did look through the page you referred me to, I however do not see anything related to checking for one of many values inside of a field. This is part of the condition not necessarily part of the select. I do not see a page on supported condition operators. Thus the reason I asked the original question.
This functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
If you can create a feature request then it'll help us improve things!
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.