# Non existing scripts execute - what is going on

**URL:** <https://discuss.elastic.co/t/non-existing-scripts-execute-what-is-going-on/18824>\
**Category:** Elasticsearch\
**Created:** [July 23, 2014, 2:01pm UTC](https://discuss.elastic.co/t/non-existing-scripts-execute-what-is-going-on/18824 "2014-07-23T14:01:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian\_M](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@Adrian\_M](https://discuss.elastic.co/u/Adrian_M)\
**Post date:** [July 23, 2014, 2:01pm UTC](https://discuss.elastic.co/t/non-existing-scripts-execute-what-is-going-on/18824/1 "2014-07-23T14:01:37Z")

</div>

My windows test machine where I have ES installed has restarted  
automatically several times during the day. I was testing some custom  
scripts in ES.

After restart I went back to continue my tests and realized that any script  
I told ES to run it would do the same thing and always give me results.  
Even when I used scripts which did not exist. Take this example:

{  
"query": {  
"custom\_score": {  
"query": {  
"match\_all": {}  
},  
"script": "sdgfhjgf",  
"params": {  
"site": "rgf"  
},  
"lang": "native"  
}  
}  
}

This returns to me doc and with a score of 1!!! This script: sdgfhjgf,  
doesn't even exist yet ES returns results from it! What is going on?

PS - I tried this same JSON query on a different ES cluster and as expected  
I get an error.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f2616992-1f30-4ef0-906a-d7dc3bd583f0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f2616992-1f30-4ef0-906a-d7dc3bd583f0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:13am UTC](https://discuss.elastic.co/t/non-existing-scripts-execute-what-is-going-on/18824/2 "2017-07-06T01:13:55Z")

</div>

Closed on July 6, 2017, 1:13am UTC


