Does ES 6.2 supports script files under config/scripts folder


(mingc) #1

Hi all,

I am currently using ES 1.6 and trying to upgrade to 6.2. As part of the upgrade, I need to add some scripting functionalities. In 1.6 documentation, I found ES allows you to put a script under config/scripts folder and it can be referenced by name like the following.

$ tree config
config
├── elasticsearch.yml
├── logging.yml
└── scripts
└── calculate-score.groovy

curl -XPOST localhost:9200/_search -d '{
"query": {
"function_score": {
"query": {
"match": {
"body": "foo"
}
},
"functions": [
{
"script_score": {
"lang": "groovy",
"script_file": "calculate-score",
"params": {
"my_modifier": 8
}
}
}
]
}
}
}'

However, I can't find this feature mentioned in 6.2 documentation. Does anyone know if this script file feature is still supported in 6.2? Do I need to use indexed scripts instead?

Thank you.


(Jack Conradson) #2

File Scripts were removed in 6.0, stored scripts should be used as their replacement in 6.0+.

The PR that removed them:
(https://github.com/elastic/elasticsearch/pull/24552)


(system) #3

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