My server was running fine until I start getting this error for search 
queries:

RequestError: TransportError(400, u'SearchPhaseExecutionException[Failed to 
execute phase [query], all shards failed; shardFailures

{[bgh1FwvvTmydjtDhY-reCA][article-index][3]: 
SearchParseException[[article-index][3]: from[-1],size[-1]: Parse Failure 
[Failed to parse source [{"query": {"custom_score": {"query": 
{"query_string": {"query": "Arvi", "fields": ["text", "title^3", 
"domain"]}}, "script": "_score * 
(1.000008**(doc[\'articleid\'].value*50000.0/100000.0))"}}}]]]; nested: 
QueryParsingException[[article-index] [custom_score] the script could not 
be loaded]; nested: ScriptException[dynamic scripting disabled]; }

{[bgh1FwvvTmydjtDhY-reCA][article-index][4]: 
SearchParseException[[article-index][4]: from[-1],size[-1]: Parse Failure 
[Failed to parse source [{"query": {"custom_score": {"query": 
{"query_string": {"query": "Arvi", "fields": ["text", "title^3", 
"domain"]}}, "script": "_score * 
(1.000008**(doc[\'articleid\'].value*50000.0/100000.0))"}}}]]]; nested: 
QueryParsingException[[article-index] [custom_score] the script could not 
be loaded]; nested: ScriptException[dynamic scripting disabled]; }

{[bgh1FwvvTmydjtDhY-reCA][article-index][1]: 
SearchParseException[[article-index][1]: from[-1],size[-1]: Parse Failure 
[Failed to parse source [{"query": {"custom_score": {"query": 
{"query_string": {"query": "Arvi", "fields": ["text", "title^3", 
"domain"]}}, "script": "_score * 
(1.000008**(doc[\'articleid\'].value*50000.0/100000.0))"}}}]]]; nested: 
QueryParsingException[[article-index] [custom_score] the script could not 
be loaded]; nested: ScriptException[dynamic scripting disabled]; }

{[bgh1FwvvTmydjtDhY-reCA][article-index][2]: 
SearchParseException[[article-index][2]: from[-1],size[-1]: Parse Failure 
[Failed to parse source [{"query": {"custom_score": {"query": 
{"query_string": {"query": "Arvi", "fields": ["text", "title^3", 
"domain"]}}, "script": "_score * 
(1.000008**(doc[\'articleid\'].value*50000.0/100000.0))"}}}]]]; nested: 
QueryParsingException[[article-index] [custom_score] the script could not 
be loaded]; nested: ScriptException[dynamic scripting disabled]; }]' )

I do not understand what has been changed. Using pyelasticsearch, this is 
the query being pushed

    bodyquery = {

        "custom_score": {
            "script" : "_score * 
("+str(1.0+recency)+"**(doc['articleid'].value*50000.0/"+maxarticleid+"))",
            "query": {
                    "query_string": {"query": keywordstr, "fields": ["text", 
"title^3", "domain"]}
            }
        }
    }

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/66b3ba4f-e062-42b2-a144-956fff13a5b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to