# Using function\_score error

**URL:** <https://discuss.elastic.co/t/using-function-score-error/20485>\
**Category:** Elasticsearch\
**Created:** [October 29, 2014, 6:44pm UTC](https://discuss.elastic.co/t/using-function-score-error/20485 "2014-10-29T18:44:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manuel\_Sciuto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manuel_sciuto/32/1111_2.png) [@Manuel\_Sciuto](https://discuss.elastic.co/u/Manuel_Sciuto)\
**Post date:** [October 29, 2014, 6:44pm UTC](https://discuss.elastic.co/t/using-function-score-error/20485/1 "2014-10-29T18:44:07Z")

</div>

Hello everyone

Do not understand why it does not work

# Create some docs

PUT /searchtube/video/1  
{  
"title": "Sick Sad World: Cold Breeze on the Interstate",  
"description": "Is your toll collector wearing pants, a skirt, or nothing  
but a smile? Cold Breeze on the Interstate, next on Sick, Sad World.",  
"views": 500,  
"likes":2,  
"created\_at": "2014-04-22T08:00:00"  
}

PUT /searchtube/video/2  
{  
"title": "Sick Sad World: The Severed Pianist",  
"description": "When he turned up his nose at accordion lessons, they cut  
off his inheritance molto allegro. The Severed Pianist, next on Sick, Sad  
World.",  
"views": 6000,  
"likes": 100,  
"created\_at": "2014-04-22T12:00:00"  
}

#SEARCH FUCNTION\_SCORE  
GET /searchtube/\_search  
{  
"query": {  
"function\_score": {  
"query": {"match": {"\_all": "severed"}},  
"script\_score": {  
"script": "\_score \* log(doc['likes'].value + doc['views'].value +  
1)"  
}  
}  
}  
}

Error Response

{  
"error": "SearchPhaseExecutionException[Failed to execute phase [query],  
all shards failed; shardFailures {[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][0]:  
SearchParseException[[searchtube][0]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\n "query": {\n "function\_score": {\n  
"query": {"match": {"\_all": "severed"}},\n "script\_score":  
{\n "script": "\_score \* log(doc['likes'].value +  
doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
QueryParsingException[[searchtube] script\_score the script could not be  
loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
}{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][1]:  
SearchParseException[[searchtube][1]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\n "query": {\n "function\_score": {\n  
"query": {"match": {"\_all": "severed"}},\n "script\_score":  
{\n "script": "\_score \* log(doc['likes'].value +  
doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
QueryParsingException[[searchtube] script\_score the script could not be  
loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
}{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][2]:  
SearchParseException[[searchtube][2]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\n "query": {\n "function\_score": {\n  
"query": {"match": {"\_all": "severed"}},\n "script\_score":  
{\n "script": "\_score \* log(doc['likes'].value +  
doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
QueryParsingException[[searchtube] script\_score the script could not be  
loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
}{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][3]:  
SearchParseException[[searchtube][3]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\n "query": {\n "function\_score": {\n  
"query": {"match": {"\_all": "severed"}},\n "script\_score":  
{\n "script": "\_score \* log(doc['likes'].value +  
doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
QueryParsingException[[searchtube] script\_score the script could not be  
loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
}{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][4]:  
SearchParseException[[searchtube][4]: from[-1],size[-1]: Parse Failure  
[Failed to parse source [{\n "query": {\n "function\_score": {\n  
"query": {"match": {"\_all": "severed"}},\n "script\_score":  
{\n "script": "\_score \* log(doc['likes'].value +  
doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
QueryParsingException[[searchtube] script\_score the script could not be  
loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
}]",  
"status": 400  
}

What is this doing wrong? It is an example that I found  
in [https://www.found.no/foundation/function-scoring/](https://www.found.no/foundation/function-scoring/)

--  
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/93f73abd-61b1-4569-bc2a-10b526e08b81%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93f73abd-61b1-4569-bc2a-10b526e08b81%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [October 29, 2014, 7:30pm UTC](https://discuss.elastic.co/t/using-function-score-error/20485/2 "2014-10-29T19:30:52Z")

</div>

Mvel has been removed in recent versions of Elasticsearch due to security  
issues. Either change your script to use Groovy (preferred) or install the  
mvel plugin.

Cheers,

Ivan  
On Oct 29, 2014 2:44 PM, "Manuel Sciuto" [msciuto@viajeros.com](mailto:msciuto@viajeros.com) wrote:

> Hello everyone
> 
> Do not understand why it does not work
> 
> # Create some docs
> 
> PUT /searchtube/video/1  
> {  
> "title": "Sick Sad World: Cold Breeze on the Interstate",  
> "description": "Is your toll collector wearing pants, a skirt, or  
> nothing but a smile? Cold Breeze on the Interstate, next on Sick, Sad  
> World.",  
> "views": 500,  
> "likes":2,  
> "created\_at": "2014-04-22T08:00:00"  
> }
> 
> PUT /searchtube/video/2  
> {  
> "title": "Sick Sad World: The Severed Pianist",  
> "description": "When he turned up his nose at accordion lessons, they  
> cut off his inheritance molto allegro. The Severed Pianist, next on Sick,  
> Sad World.",  
> "views": 6000,  
> "likes": 100,  
> "created\_at": "2014-04-22T12:00:00"  
> }
> 
> #search FUCNTION\_SCORE  
> GET /searchtube/\_search  
> {  
> "query": {  
> "function\_score": {  
> "query": {"match": {"\_all": "severed"}},  
> "script\_score": {  
> "script": "\_score \* log(doc['likes'].value + doc['views'].value +  
> 1)"  
> }  
> }  
> }  
> }
> 
> Error Response
> 
> {  
> "error": "SearchPhaseExecutionException[Failed to execute phase  
> [query], all shards failed; shardFailures  
> {[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][0]:  
> SearchParseException[[searchtube][0]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][1]:  
> SearchParseException[[searchtube][1]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][2]:  
> SearchParseException[[searchtube][2]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][3]:  
> SearchParseException[[searchtube][3]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][4]:  
> SearchParseException[[searchtube][4]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }]",  
> "status": 400  
> }
> 
> What is this doing wrong? It is an example that I found in  
> [A Gentle Intro to Function Scoring | Elastic Blog](https://www.found.no/foundation/function-scoring/)
> 
> --  
> 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/93f73abd-61b1-4569-bc2a-10b526e08b81%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93f73abd-61b1-4569-bc2a-10b526e08b81%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/93f73abd-61b1-4569-bc2a-10b526e08b81%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/93f73abd-61b1-4569-bc2a-10b526e08b81%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CALY%3DcQB8KNZrKqPhAhUqzTL0GOKbaNO6fNjvZHDdMa08CV%2Bdfg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQB8KNZrKqPhAhUqzTL0GOKbaNO6fNjvZHDdMa08CV%2Bdfg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [November 1, 2014, 4:02pm UTC](https://discuss.elastic.co/t/using-function-score-error/20485/3 "2014-11-01T16:02:13Z")

</div>

The root cause of the error is here:  
"ScriptException[dynamic scripting for [mvel] disabled]; "

I would guess you are running on ES 1.2 or 1.3? Dynamic scripting was  
disabled by default in 1.2, and for non sandboxed languages in 1.3. In  
1.4, the default script language was changed to Groovy, which is sandboxed,  
and thus can be safely compiled dynamically.

See this blog for more details:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

If running in 1.3, you can simply change the language of the script:  
GET /searchtube/\_search  
{  
"query": {  
"function\_score": {  
"query": {"match": {"\_all": "severed"}},  
"script\_score": {  
"script": "\_score \* log(doc['likes'].value + doc['views'].value + 1)"  
,  
"lang": "groovy"  
}  
}  
}  
}

Although you could also use the "expr" lang (expressions) for this simple  
script, which will be much faster!

On Wednesday, October 29, 2014 11:44:07 AM UTC-7, Manuel Sciuto wrote:

> Hello everyone
> 
> Do not understand why it does not work
> 
> # Create some docs
> 
> PUT /searchtube/video/1  
> {  
> "title": "Sick Sad World: Cold Breeze on the Interstate",  
> "description": "Is your toll collector wearing pants, a skirt, or  
> nothing but a smile? Cold Breeze on the Interstate, next on Sick, Sad  
> World.",  
> "views": 500,  
> "likes":2,  
> "created\_at": "2014-04-22T08:00:00"  
> }
> 
> PUT /searchtube/video/2  
> {  
> "title": "Sick Sad World: The Severed Pianist",  
> "description": "When he turned up his nose at accordion lessons, they  
> cut off his inheritance molto allegro. The Severed Pianist, next on Sick,  
> Sad World.",  
> "views": 6000,  
> "likes": 100,  
> "created\_at": "2014-04-22T12:00:00"  
> }
> 
> #search FUCNTION\_SCORE  
> GET /searchtube/\_search  
> {  
> "query": {  
> "function\_score": {  
> "query": {"match": {"\_all": "severed"}},  
> "script\_score": {  
> "script": "\_score \* log(doc['likes'].value + doc['views'].value +  
> 1)"  
> }  
> }  
> }  
> }
> 
> Error Response
> 
> {  
> "error": "SearchPhaseExecutionException[Failed to execute phase  
> [query], all shards failed; shardFailures  
> {[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][0]:  
> SearchParseException[[searchtube][0]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][1]:  
> SearchParseException[[searchtube][1]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][2]:  
> SearchParseException[[searchtube][2]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][3]:  
> SearchParseException[[searchtube][3]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][4]:  
> SearchParseException[[searchtube][4]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> {\n "script": "\_score \* log(doc['likes'].value +  
> doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> QueryParsingException[[searchtube] script\_score the script could not be  
> loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> }]",  
> "status": 400  
> }
> 
> What is this doing wrong? It is an example that I found in  
> [A Gentle Intro to Function Scoring | Elastic Blog](https://www.found.no/foundation/function-scoring/)

--  
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/7899a825-47d8-496d-9c4d-e0fcc26797b4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7899a825-47d8-496d-9c4d-e0fcc26797b4%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Manuel\_Sciuto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manuel_sciuto/32/1111_2.png) [@Manuel\_Sciuto](https://discuss.elastic.co/u/Manuel_Sciuto)\
**Post date:** [November 3, 2014, 2:59pm UTC](https://discuss.elastic.co/t/using-function-score-error/20485/4 "2014-11-03T14:59:04Z")

</div>

Thank you very much !!!

How do you recommend that I do my script\_score?

El sábado, 1 de noviembre de 2014 13:02:13 UTC-3, Ryan Ernst escribió:

> The root cause of the error is here:  
> "ScriptException[dynamic scripting for [mvel] disabled]; "
> 
> I would guess you are running on ES 1.2 or 1.3? Dynamic scripting was  
> disabled by default in 1.2, and for non sandboxed languages in 1.3. In  
> 1.4, the default script language was changed to Groovy, which is sandboxed,  
> and thus can be safely compiled dynamically.
> 
> See this blog for more details:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/scripting-security/)
> 
> If running in 1.3, you can simply change the language of the script:  
> GET /searchtube/\_search  
> {  
> "query": {  
> "function\_score": {  
> "query": {"match": {"\_all": "severed"}},  
> "script\_score": {  
> "script": "\_score \* log(doc['likes'].value + doc['views'].value +  
> 1)",  
> "lang": "groovy"  
> }  
> }  
> }  
> }
> 
> Although you could also use the "expr" lang (expressions) for this simple  
> script, which will be much faster!
> 
> On Wednesday, October 29, 2014 11:44:07 AM UTC-7, Manuel Sciuto wrote:
> 
> > Hello everyone
> > 
> > Do not understand why it does not work
> > 
> > # Create some docs
> > 
> > PUT /searchtube/video/1  
> > {  
> > "title": "Sick Sad World: Cold Breeze on the Interstate",  
> > "description": "Is your toll collector wearing pants, a skirt, or  
> > nothing but a smile? Cold Breeze on the Interstate, next on Sick, Sad  
> > World.",  
> > "views": 500,  
> > "likes":2,  
> > "created\_at": "2014-04-22T08:00:00"  
> > }
> > 
> > PUT /searchtube/video/2  
> > {  
> > "title": "Sick Sad World: The Severed Pianist",  
> > "description": "When he turned up his nose at accordion lessons, they  
> > cut off his inheritance molto allegro. The Severed Pianist, next on Sick,  
> > Sad World.",  
> > "views": 6000,  
> > "likes": 100,  
> > "created\_at": "2014-04-22T12:00:00"  
> > }
> > 
> > #search FUCNTION\_SCORE  
> > GET /searchtube/\_search  
> > {  
> > "query": {  
> > "function\_score": {  
> > "query": {"match": {"\_all": "severed"}},  
> > "script\_score": {  
> > "script": "\_score \* log(doc['likes'].value + doc['views'].value +  
> > 1)"  
> > }  
> > }  
> > }  
> > }
> > 
> > Error Response
> > 
> > {  
> > "error": "SearchPhaseExecutionException[Failed to execute phase  
> > [query], all shards failed; shardFailures  
> > {[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][0]:  
> > SearchParseException[[searchtube][0]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][1]:  
> > SearchParseException[[searchtube][1]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][2]:  
> > SearchParseException[[searchtube][2]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][3]:  
> > SearchParseException[[searchtube][3]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][4]:  
> > SearchParseException[[searchtube][4]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }]",  
> > "status": 400  
> > }
> > 
> > What is this doing wrong? It is an example that I found in  
> > [A Gentle Intro to Function Scoring | Elastic Blog](https://www.found.no/foundation/function-scoring/)

--  
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/cba0a627-ebfb-4895-924f-84d1be7f81ed%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cba0a627-ebfb-4895-924f-84d1be7f81ed%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Manuel\_Sciuto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manuel_sciuto/32/1111_2.png) [@Manuel\_Sciuto](https://discuss.elastic.co/u/Manuel_Sciuto)\
**Post date:** [November 3, 2014, 6:46pm UTC](https://discuss.elastic.co/t/using-function-score-error/20485/5 "2014-11-03T18:46:06Z")

</div>

I have an error

My mapping

- "mappings": {
  - "comida": {
    - "dynamic": "true",
    - "numeric\_detection": true,
    - "properties": {
      - "id": {
        - "type": "integer"  
},

      - "reviews": {
        - "type": "integer"  
},

      - "name": {
        - "analyzer": "myAnalyzerDestinos",
        - "type": "string"  
}  
}  
},

  - "actividades": {
    - "dynamic": "true",
    - "numeric\_detection": true,
    - "properties": {
      - "id": {
        - "type": "integer"  
},

      - "reviews": {
        - "type": "integer"  
},

      - "name": {
        - "analyzer": "myAnalyzerDestinos",
        - "type": "string"  
}  
}  
},

  - "alojamiento": {
    - "dynamic": "true",
    - "numeric\_detection": true,
    - "properties": {
      - "id": {
        - "type": "integer"  
},

      - "reviews": {
        - "type": "integer"  
},

      - "name": {
        - "analyzer": "myAnalyzerDestinos",
        - "type": "string"  
}  
}  
},

  - "transporte\_&\_servicios": {
    - "dynamic": "true",
    - "numeric\_detection": true,
    - "properties": {
      - "id": {
        - "type": "integer"  
},

      - "reviews": {
        - "type": "integer"  
},

      - "name": {
        - "analyzer": "myAnalyzerDestinos",
        - "type": "string"  
}  
}  
}  
},

My Query

GET /business/\_search  
{  
"query": {  
"function\_score": {  
"query": {"match": {"name": "sheraton"}},  
"script\_score": {  
"script": "\_score doc['reviews'].value",  
"lang": "groovy"  
}  
}  
}  
}

Response

{  
"error": "SearchPhaseExecutionException[Failed to execute phase [query],  
all shards failed; shardFailures {[pGQYzpifRMumKUcblgTp2Q][business][0]:  
QueryPhaseExecutionException[[business][0]: query[function score (name:she  
name:sher name:shera name:sherat name:sherato  
name:sheraton,function=script[\_score doc['reviews'].value], params  
[null])],from[0],size[10]: Query Failed [Failed to execute main query]];  
nested: GroovyScriptExecutionException[MissingMethodException[No signature  
of method:  
org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript$UpdateableFloat.call()  
is applicable for argument types: (java.lang.Long) values: [11]\nPossible  
solutions: wait(long), wait(), abs(), any(), wait(long, int),  
and(java.lang.Number)]]; }{[pGQYzpifRMumKUcblgTp2Q][business][1]:  
QueryPhaseExecutionException[[business][1]: query[function score (name:she  
name:sher name:shera name:sherat name:sherato  
name:sheraton,function=script[\_score doc['reviews'].value], params  
[null])],from[0],size[10]: Query Failed [Failed to execute main query]];  
nested: GroovyScriptExecutionException[MissingMethodException[No signature  
of method:  
org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript$UpdateableFloat.call()  
is applicable for argument types: (java.lang.Long) values: [16]\nPossible  
solutions: wait(long), wait(), abs(), any(), wait(long, int),  
and(java.lang.Number)]]; }]",  
"status": 500  
}

Why?

El sábado, 1 de noviembre de 2014 13:02:13 UTC-3, Ryan Ernst escribió:

> The root cause of the error is here:  
> "ScriptException[dynamic scripting for [mvel] disabled]; "
> 
> I would guess you are running on ES 1.2 or 1.3? Dynamic scripting was  
> disabled by default in 1.2, and for non sandboxed languages in 1.3. In  
> 1.4, the default script language was changed to Groovy, which is sandboxed,  
> and thus can be safely compiled dynamically.
> 
> See this blog for more details:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/scripting-security/)
> 
> If running in 1.3, you can simply change the language of the script:  
> GET /searchtube/\_search  
> {  
> "query": {  
> "function\_score": {  
> "query": {"match": {"\_all": "severed"}},  
> "script\_score": {  
> "script": "\_score \* log(doc['likes'].value + doc['views'].value +  
> 1)",  
> "lang": "groovy"  
> }  
> }  
> }  
> }
> 
> Although you could also use the "expr" lang (expressions) for this simple  
> script, which will be much faster!
> 
> On Wednesday, October 29, 2014 11:44:07 AM UTC-7, Manuel Sciuto wrote:
> 
> > Hello everyone
> > 
> > Do not understand why it does not work
> > 
> > # Create some docs
> > 
> > PUT /searchtube/video/1  
> > {  
> > "title": "Sick Sad World: Cold Breeze on the Interstate",  
> > "description": "Is your toll collector wearing pants, a skirt, or  
> > nothing but a smile? Cold Breeze on the Interstate, next on Sick, Sad  
> > World.",  
> > "views": 500,  
> > "likes":2,  
> > "created\_at": "2014-04-22T08:00:00"  
> > }
> > 
> > PUT /searchtube/video/2  
> > {  
> > "title": "Sick Sad World: The Severed Pianist",  
> > "description": "When he turned up his nose at accordion lessons, they  
> > cut off his inheritance molto allegro. The Severed Pianist, next on Sick,  
> > Sad World.",  
> > "views": 6000,  
> > "likes": 100,  
> > "created\_at": "2014-04-22T12:00:00"  
> > }
> > 
> > #search FUCNTION\_SCORE  
> > GET /searchtube/\_search  
> > {  
> > "query": {  
> > "function\_score": {  
> > "query": {"match": {"\_all": "severed"}},  
> > "script\_score": {  
> > "script": "\_score \* log(doc['likes'].value + doc['views'].value +  
> > 1)"  
> > }  
> > }  
> > }  
> > }
> > 
> > Error Response
> > 
> > {  
> > "error": "SearchPhaseExecutionException[Failed to execute phase  
> > [query], all shards failed; shardFailures  
> > {[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][0]:  
> > SearchParseException[[searchtube][0]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][1]:  
> > SearchParseException[[searchtube][1]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][2]:  
> > SearchParseException[[searchtube][2]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][3]:  
> > SearchParseException[[searchtube][3]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][4]:  
> > SearchParseException[[searchtube][4]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > {\n "script": "\_score \* log(doc['likes'].value +  
> > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > QueryParsingException[[searchtube] script\_score the script could not be  
> > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > }]",  
> > "status": 400  
> > }
> > 
> > What is this doing wrong? It is an example that I found in  
> > [A Gentle Intro to Function Scoring | Elastic Blog](https://www.found.no/foundation/function-scoring/)

--  
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/d77e9d78-e7e7-4a9b-bb52-2cbf1c929aaf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d77e9d78-e7e7-4a9b-bb52-2cbf1c929aaf%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![alex\_8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_8/32/888_2.png) [@alex\_8](https://discuss.elastic.co/u/alex_8)\
**Post date:** [February 20, 2015, 5:11pm UTC](https://discuss.elastic.co/t/using-function-score-error/20485/6 "2015-02-20T17:11:12Z")

</div>

The error is in your groovy script, as indicated  
by GroovyScriptExecutionException. All the other info is just making it  
more difficult to help you.

"script": "\_score doc['reviews'].value"

> 

Your script doesn't use any operator. It's likely that you just want to  
multiply: "\_score \* doc['reviews'].value".  
In groovy, function call arguments do not need to be enclosed in brackets.  
E.g. "println 'hello'" is equivalent to "println('hello')". By omitting the  
operator, your script is trying to call \_score (which is some  
UpdatableFloat), with the document field as an argument.

Cheers!

Op maandag 3 november 2014 19:46:07 UTC+1 schreef Manuel Sciuto:

> I have an error
> 
> My mapping
> 
> - "mappings": {
> - "comida": {
> - "dynamic": "true",
> - "numeric\_detection": true,
> - "properties": {
> - "id": {
> - "type": "integer"  
> },
> 
> - "reviews": {
> - "type": "integer"  
> },
> 
> - "name": {
> - "analyzer": "myAnalyzerDestinos",
> - "type": "string"  
> }  
> }  
> },
> 
> - "actividades": {
> - "dynamic": "true",
> - "numeric\_detection": true,
> - "properties": {
> - "id": {
> - "type": "integer"  
> },
> 
> - "reviews": {
> - "type": "integer"  
> },
> 
> - "name": {
> - "analyzer": "myAnalyzerDestinos",
> - "type": "string"  
> }  
> }  
> },
> 
> - "alojamiento": {
> - "dynamic": "true",
> - "numeric\_detection": true,
> - "properties": {
> - "id": {
> - "type": "integer"  
> },
> 
> - "reviews": {
> - "type": "integer"  
> },
> 
> - "name": {
> - "analyzer": "myAnalyzerDestinos",
> - "type": "string"  
> }  
> }  
> },
> 
> - "transporte\_&\_servicios": {
> - "dynamic": "true",
> - "numeric\_detection": true,
> - "properties": {
> - "id": {
> - "type": "integer"  
> },
> 
> - "reviews": {
> - "type": "integer"  
> },
> 
> - "name": {
> - "analyzer": "myAnalyzerDestinos",
> - "type": "string"  
> }  
> }  
> }  
> },
> 
> My Query
> 
> GET /business/\_search  
> {  
> "query": {  
> "function\_score": {  
> "query": {"match": {"name": "sheraton"}},  
> "script\_score": {  
> "script": "\_score doc['reviews'].value",  
> "lang": "groovy"  
> }  
> }  
> }  
> }
> 
> Response
> 
> {  
> "error": "SearchPhaseExecutionException[Failed to execute phase  
> [query], all shards failed; shardFailures  
> {[pGQYzpifRMumKUcblgTp2Q][business][0]:  
> QueryPhaseExecutionException[[business][0]: query[function score (name:she  
> name:sher name:shera name:sherat name:sherato  
> name:sheraton,function=script[\_score doc['reviews'].value], params  
> [null])],from[0],size[10]: Query Failed [Failed to execute main query]];  
> nested: GroovyScriptExecutionException[MissingMethodException[No signature  
> of method:  
> org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript$UpdateableFloat.call()  
> is applicable for argument types: (java.lang.Long) values: [11]\nPossible  
> solutions: wait(long), wait(), abs(), any(), wait(long, int),  
> and(java.lang.Number)]]; }{[pGQYzpifRMumKUcblgTp2Q][business][1]:  
> QueryPhaseExecutionException[[business][1]: query[function score (name:she  
> name:sher name:shera name:sherat name:sherato  
> name:sheraton,function=script[\_score doc['reviews'].value], params  
> [null])],from[0],size[10]: Query Failed [Failed to execute main query]];  
> nested: GroovyScriptExecutionException[MissingMethodException[No signature  
> of method:  
> org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript$UpdateableFloat.call()  
> is applicable for argument types: (java.lang.Long) values: [16]\nPossible  
> solutions: wait(long), wait(), abs(), any(), wait(long, int),  
> and(java.lang.Number)]]; }]",  
> "status": 500  
> }
> 
> Why?
> 
> El sábado, 1 de noviembre de 2014 13:02:13 UTC-3, Ryan Ernst escribió:
> 
> > The root cause of the error is here:  
> > "ScriptException[dynamic scripting for [mvel] disabled]; "
> > 
> > I would guess you are running on ES 1.2 or 1.3? Dynamic scripting was  
> > disabled by default in 1.2, and for non sandboxed languages in 1.3. In  
> > 1.4, the default script language was changed to Groovy, which is sandboxed,  
> > and thus can be safely compiled dynamically.
> > 
> > See this blog for more details:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/scripting-security/)
> > 
> > If running in 1.3, you can simply change the language of the script:  
> > GET /searchtube/\_search  
> > {  
> > "query": {  
> > "function\_score": {  
> > "query": {"match": {"\_all": "severed"}},  
> > "script\_score": {  
> > "script": "\_score \* log(doc['likes'].value + doc['views'].value +  
> > 1)",  
> > "lang": "groovy"  
> > }  
> > }  
> > }  
> > }
> > 
> > Although you could also use the "expr" lang (expressions) for this simple  
> > script, which will be much faster!
> > 
> > On Wednesday, October 29, 2014 11:44:07 AM UTC-7, Manuel Sciuto wrote:
> > 
> > > Hello everyone
> > > 
> > > Do not understand why it does not work
> > > 
> > > # Create some docs
> > > 
> > > PUT /searchtube/video/1  
> > > {  
> > > "title": "Sick Sad World: Cold Breeze on the Interstate",  
> > > "description": "Is your toll collector wearing pants, a skirt, or  
> > > nothing but a smile? Cold Breeze on the Interstate, next on Sick, Sad  
> > > World.",  
> > > "views": 500,  
> > > "likes":2,  
> > > "created\_at": "2014-04-22T08:00:00"  
> > > }
> > > 
> > > PUT /searchtube/video/2  
> > > {  
> > > "title": "Sick Sad World: The Severed Pianist",  
> > > "description": "When he turned up his nose at accordion lessons, they  
> > > cut off his inheritance molto allegro. The Severed Pianist, next on Sick,  
> > > Sad World.",  
> > > "views": 6000,  
> > > "likes": 100,  
> > > "created\_at": "2014-04-22T12:00:00"  
> > > }
> > > 
> > > #search FUCNTION\_SCORE  
> > > GET /searchtube/\_search  
> > > {  
> > > "query": {  
> > > "function\_score": {  
> > > "query": {"match": {"\_all": "severed"}},  
> > > "script\_score": {  
> > > "script": "\_score \* log(doc['likes'].value + doc['views'].value
> > > 
> > > - 1)"  
> > > }  
> > > }  
> > > }  
> > > }
> > > 
> > > Error Response
> > > 
> > > {  
> > > "error": "SearchPhaseExecutionException[Failed to execute phase  
> > > [query], all shards failed; shardFailures  
> > > {[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][0]:  
> > > SearchParseException[[searchtube][0]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > > {\n "script": "\_score \* log(doc['likes'].value +  
> > > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > > QueryParsingException[[searchtube] script\_score the script could not be  
> > > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][1]:  
> > > SearchParseException[[searchtube][1]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > > {\n "script": "\_score \* log(doc['likes'].value +  
> > > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > > QueryParsingException[[searchtube] script\_score the script could not be  
> > > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][2]:  
> > > SearchParseException[[searchtube][2]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > > {\n "script": "\_score \* log(doc['likes'].value +  
> > > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > > QueryParsingException[[searchtube] script\_score the script could not be  
> > > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][3]:  
> > > SearchParseException[[searchtube][3]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > > {\n "script": "\_score \* log(doc['likes'].value +  
> > > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > > QueryParsingException[[searchtube] script\_score the script could not be  
> > > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > > }{[vrJl1dg1RV2wqGZ2Hqv3zQ][searchtube][4]:  
> > > SearchParseException[[searchtube][4]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [{\n "query": {\n "function\_score": {\n  
> > > "query": {"match": {"\_all": "severed"}},\n "script\_score":  
> > > {\n "script": "\_score \* log(doc['likes'].value +  
> > > doc['views'].value + 1)"\n }\n }\n }\n}\n]]]; nested:  
> > > QueryParsingException[[searchtube] script\_score the script could not be  
> > > loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled];  
> > > }]",  
> > > "status": 400  
> > > }
> > > 
> > > What is this doing wrong? It is an example that I found in  
> > > [A Gentle Intro to Function Scoring | Elastic Blog](https://www.found.no/foundation/function-scoring/)

--  
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/26cbb104-794c-4a5e-8397-18c015143ae8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26cbb104-794c-4a5e-8397-18c015143ae8%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, 12:31am UTC](https://discuss.elastic.co/t/using-function-score-error/20485/7 "2017-07-06T00:31:10Z")

</div>


