# Does ES 6.2 supports script files under config/scripts folder

**URL:** <https://discuss.elastic.co/t/does-es-6-2-supports-script-files-under-config-scripts-folder/132861>\
**Category:** Elasticsearch\
**Created:** [May 22, 2018, 5:13pm UTC](https://discuss.elastic.co/t/does-es-6-2-supports-script-files-under-config-scripts-folder/132861 "2018-05-22T17:13:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mingc](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mingc](https://discuss.elastic.co/u/mingc)\
**Post date:** [May 22, 2018, 5:13pm UTC](https://discuss.elastic.co/t/does-es-6-2-supports-script-files-under-config-scripts-folder/132861/1 "2018-05-22T17:13:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jack\_Conradson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_conradson/32/47236_2.png) [@Jack\_Conradson](https://discuss.elastic.co/u/Jack_Conradson)\
**Post date:** [May 25, 2018, 4:58pm UTC](https://discuss.elastic.co/t/does-es-6-2-supports-script-files-under-config-scripts-folder/132861/2 "2018-05-25T16:58:27Z")

</div>

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](https://github.com/elastic/elasticsearch/pull/24552))

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 22, 2018, 4:58pm UTC](https://discuss.elastic.co/t/does-es-6-2-supports-script-files-under-config-scripts-folder/132861/3 "2018-06-22T16:58:32Z")

</div>

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