Painless in score context doesn't work with more_like_this query

Hi.
To get a score of my query, I used this painless query below.
But it doesn't work.

    GET _scripts/painless/_execute
    {
    "script": {
        "source": "_score"
    },
    "context": "score",
    "context_setup": {
        "index": "review",
        "document": {
          "content": "He was great. It was very professional like the Elasticsearch folks."
        },
        "query": {
          "more_like_this": {
            "fields": [
                "content"
            ],
            "like": "He was great. It was very professional like the Elasticsearch folks."
          }
        }
    }
    }

And I got this error message,

    {
      "error" : {
        "root_cause" : [
          {
            "type" : "null_pointer_exception",
            "reason" : null
          }
        ],
        "type" : "null_pointer_exception",
        "reason" : null
      },
      "status" : 500
    }

I don't know the reason.
What could be wrong?

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