1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Elasticsearch error: SearchPhaseExecutionException

Discussion in 'Enhanced Search Support' started by sapph, Jan 31, 2016.

  1. sapph

    sapph Member

    XenForo_Exception: Elasticsearch error: SearchPhaseExecutionException[Failed to execute phase [query_fetch], all shards failed; shardFailures {[LeSg7gYxQuiqDmQmcKe0dg][xenpub][0]: SearchParseException[[xenpub][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"query_string":{"query":"test","fields":["title^3","message"],"default_operator":"and"}},"script_score":{"params":{"now":1454255578,"halflife":31536000},"lang":"mvel","script":"xf-date-weighted"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":1000,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[xenpub] script_score the script could not be loaded]; nested: ScriptException[dynamic scripting disabled]; }] - library/XenES/Search/SourceHandler/ElasticSearch.php:868

    I can query things directly on the server using curl, and it returns the data with no error. I just can't do it from my forum.

    Running Debian Jessie with Elasticsearch installed from the repos, no settings changed except for setting the shards/replicas to 1/0.

    Edit: Rather than using the version in the Debian repo I added elastic.co and installed v2, seems to be ok now. Maybe a moderator can remove this topic.
    Last edited: Jan 31, 2016
  2. Mike

    Mike XenForo Developer Staff Member

    Just to be clear, the ultimate error was:
    ScriptException[dynamic scripting disabled]
    You have XFES set to use dynamic scripting but it wasn't enabled within Elasticsearch itself.

Share This Page