Hi All,
When i try to query on multiple indexes it throws me a Verification Exception. The single index works fine for me.
Any idea on how to query over multiple indexes in sql query.
Working one :
POST _xpack/sql?format=txt
{
"query" : "SELECT count(*) AS count FROM "logstash-texas-esb-2019.05.11" WHERE MATCH ('message','LAPC%') AND MATCH ('message','cif%') AND MATCH('message','Success%')"
}
Response :
count
10
Error Case :
POST _xpack/sql?format=txt
{
"query" : "SELECT count() AS count FROM "logstash-texas-esb-2019.05." WHERE MATCH ('message','LAPC%') AND MATCH ('message','cif%') AND MATCH('message','Success%')"
}
Error Response :
{
"error": {
"root_cause": [
{
"type": "verification_exception",
"reason": "Found 1 problem(s)\nline 1:32: [logstash-texas-esb-2019.05.] points to indices [logstash-texas-esb-2019.05.10] and [logstash-texas-esb-2019.05.20] which have different mappings. When using multiple indices, the mappings must be identical."
}
],
"type": "verification_exception",
"reason": "Found 1 problem(s)\nline 1:32: [logstash-texas-esb-2019.05.] points to indices [logstash-texas-esb-2019.05.10] and [logstash-texas-esb-2019.05.20] which have different mappings. When using multiple indices, the mappings must be identical."
},
"status": 400
}