Not a bug Error with recency weighted relevance searching enabled

Floren

Well-known member
Once I enable the recency weighted relevance searching option in XenForo 1.4.2, I get this error:
Code:
XenForo_Exception: Elasticsearch error: SearchPhaseExecutionException[Failed to execute phase [query_fetch], all shards failed; shardFailures {[CWUhfPN1Rx2LfSdU45mi8Q][axivo][0]: SearchParseException[[axivo][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"filtered":{"filter":{"and":[{"type":{"value":"resource_update"}}]},"query":{"query_string":{"query":"nginx","fields":["title^3","message"],"default_operator":"and"}}}},"script_score":{"params":{"now":1413874903,"halflife":31536000},"lang":"groovy","script":"_score \/ pow(2.0F, min(10.0F * halflife, abs(now - doc['date'].value)) \/ halflife)"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":200,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[axivo] script_score the script could not be loaded]; nested: ScriptException[dynamic scripting for [groovy] disabled]; }] - library/XenES/Search/SourceHandler/ElasticSearch.php:845
Steps to reproduce:
  1. Enable the option
  2. Rebuild search index with "Delete the index before rebuilding" option checked
  3. Search resources for "nginx" keyword
Once I unchecked the option and rebuild the indices, the search starts to function properly.
I run on Elasticsearch 1.3.4.
 
Working OK for me.
I have 365 days set as the half-life, and running ES 1.3.4 too.
Dynamic scripting is un-ticked, and stemming analyzer being used.
 
It's as it says - you have dynamic scripting disabled in ES, so you need to disable the option in XF.
 
Top Bottom