Cannot read field \"outputs\" because \"this.fst\" is null

Hi everyone.

I've got a very strange problem:

when I used dsl like:

GET index/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match_phrase": {
          "name": "some words here"
          }
        }
      ]
    }
  }
}

And I got a error:

{
  "error": {
    "root_cause": [
      {
        "type": "query_shard_exception",
        "reason": "failed to create query: Cannot read field \"outputs\" because \"this.fst\" is null",
        "index_uuid": "0MODiL1YQmqb-LUncJAjbg",
        "index": "my index"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "my index",
        "node": "aTr2L6I-T7SomLXkAzHZyA",
        "reason": {
          "type": "query_shard_exception",
          "reason": "failed to create query: Cannot read field \"outputs\" because \"this.fst\" is null",
          "index_uuid": "0MODiL1YQmqb-LUncJAjbg",
          "index": "my index",
          "caused_by": {
            "type": "null_pointer_exception",
            "reason": "Cannot read field \"outputs\" because \"this.fst\" is null"
          }
        }
      }
    ]
  },
  "status": 400
}

Strangest of all, this error doesn't always come up.

Do you have any solutions?

I have the feeling that one of the shards is corrupted or that there's a bug somewhere.

  • Could you tell which exact version you are using?
  • Is that something you can reproduce from scratch?
  • Is that in production or in dev?
  • Did you touch manually by any chance the data dir?

My ES version is 7.9.

I do migrate the data directory manually, and that may be the cause of the problem?

What do you mean by "do migrate"? What did you do exactly?

I moved the data dir, and that's why I got a error.
Thank you for your answer :wink:

So it's fixed now?

Yes, it's fixed.