Hi, I am trying out the new elasticsearch feature elasticsearch sql with elasticsearch 6.3.0
I have a question that it seems not able to query an object in an array with this sql feature.
for example I have indexed a doc as below:
PUT /test/_doc/1
{
"orderId": "123456",
"items": [
{
"itemId": "1234",
"name": "ipad"
}
]
}
and I try an query:
POST /_xpack/sql?format=txt
{
"query": "select items.itemId from test"
}
it gives me error as below:
{
"error": {
"root_cause": [
{
"type": "sql_illegal_argument_exception",
"reason": "Cannot extract value [items.itemId] from source"
}
],
"type": "sql_illegal_argument_exception",
"reason": "Cannot extract value [items.itemId] from source"
},
"status": 500
}
may I know is there a way to query the data in objects of an array?