I am running an elasticsearch instance (from elasticsearch master code) on localhost.
I ran this query -
{
"query" : {
"match_all": {}
},
"script_fields": {
"test": {
"script": "_source.<field>"
}
}
}
and this is the error I got -
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "script_lang not supported [groovy]"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "<index_name>",
"node": "XF48sEINTJu_JmWBWzTEKw",
"reason": {
"type": "illegal_argument_exception",
"reason": "script_lang not supported [groovy]"
}
}
],
"caused_by": {
"type": "illegal_argument_exception",
"reason": "script_lang not supported [groovy]"
}
},
"status": 400
}
The solutions on internet is suggesting to add groovy dependency but I think master code already declares it. (Since I added groovy 2.4.6 as a dependency which gave an error of version conflict as 2.4.4 is already declared)