Elasticsearch unable to find my script

Hi,
I'm using ES 2.4.3 and it seems that ES cannot find my scripts folder. We are running our cluster on 3 nodes : one master (directory /etc/elasticsearch) and 2 data nodes, each of them is running the service 2 times (directories /etc/elasticsearch_a and b). I tried to put the scripts directory under /etc/elasticsearch for master and under /etc/elasticsearch_a and b for data nodes but it doesn't work. Tried also /etc/elasticsearch/config (and /etc/elasticsearch_a/config and _b/config) but it does not work either.

Query is:
{
"query": {
"function_score": {
"query": {
"filtered": {
"filter": {
"bool": {
"should": [],
"must": [
{
"range": {
"date": {
"to": "20161231",
"from": "20090107"
}
}
}
]
}
},
"query": {
"term": {
"ktextp": "bourse"
}
}
}
},
"functions": [
{
"script_score": {
"script": {
"lang": "groovy",
"file": "calculate-score",
"params": {
"user_origin": "//europe//france",
"now": "2016-01-15T10:08:37",
"user_language": "Français"
}
}
}
}
]
}
},
"size": "100"
}

Output message is:
{
"error": {
"root_cause": [
{
"type": "query_parsing_exception",
"reason": "script_score the script could not be loaded",
"index": "test",
"line": 46,
"col": 11
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query_fetch",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "test",
"node": "eBRltcS0T_qUPKJmrqn00A",
"reason": {
"type": "query_parsing_exception",
"reason": "script_score the script could not be loaded",
"index": "test",
"line": 46,
"col": 11,
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Unable to find on disk file script [calculate-score] using lang [groovy]"
}
}
}
]
},
"status": 400
}

Any help greatly appreciated!

From Scripting | Elasticsearch Guide [2.4] | Elastic

You will still be able to use Groovy scripts stored in files in the config/scripts/ directory on every node.

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