hello everyone..
i'm interesting in sql api in elasticsearch 6.3 but error found with index name with '-'
example
/_search/index-example
query sql
curl --request POST \
--url http://localhost:9200/_xpack/sql/translate \
--header 'content-type: application/json' \
--data '{
"query": "SELECT * FROM index-example",
"fetch_size": 10
}'
error found
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "line 1:20: mismatched input '-' expecting {<EOF>, ',', 'FULL', 'GROUP', 'HAVING', 'INNER', 'JOIN', 'LEFT', 'LIMIT', 'NATURAL', 'ORDER', 'RIGHT', 'WHERE'}"
}
],
"type": "parsing_exception",
"reason": "line 1:20: mismatched input '-' expecting {<EOF>, ',', 'FULL', 'GROUP', 'HAVING', 'INNER', 'JOIN', 'LEFT', 'LIMIT', 'NATURAL', 'ORDER', 'RIGHT', 'WHERE'}",
"caused_by": {
"type": "input_mismatch_exception",
"reason": null
}
},
"status": 400 }