Elasticsearch sql is not working for some index


I'm unable to apply sql query on one index and i get this error,

  "error": {
    "root_cause": [
        "type": "unsupported_operation_exception",
        "reason": null
    "type": "unsupported_operation_exception",
    "reason": null
  "status": 500

However, i can run sql queries on other indexes i have and it works perfectly fine. I'm not sure why one specific index is not working.

Any advice please?


@sunitha.eswaraiah are there any flattened field types in that index?
Would be useful to know the query that fails and, also, the full stack trace from logs.

A wild guess that it's about this PR: https://github.com/elastic/elasticsearch/pull/50823 but before knowing for sure, I need answers to above questions. Thanks.

Hi @Andrei_Stefan

Thanks for the solution. I had search_as_you_type datatype in the mapping.
I reindexed removing the search_as_you_type and i'm able to apply SQL on the index.

Thanks you :slight_smile: :+1:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.