I'm trying out elastic search sql. It works fine equal operator in where clause. But I couldn't use in
operator in where clause. is there any equivalent command here. (like Terms filter)
POST _xpack/sql
{
"query":"Select * from index_name where some_no in ( '12yrcs', 'ynelb') "
}
I get the following error.
{
"error": {
"root_cause": [
{
"type": "sql_illegal_argument_exception",
"reason": "Don't know how to translate In In[some_no{f}#3005,[12yrcs, ynelb]]"
}
],
"type": "sql_illegal_argument_exception",
"reason": "Don't know how to translate In In[some_no{f}#3005,[12yrcs, ynelb]]"
},
"status": 500
}
At the time you tried ES-SQL the
IN
operator was not implemented yet probably: https://github.com/elastic/elasticsearch/issues/34622. But now, this should be done and available.