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

Not a Bug Error with recency weighted relevance searching enabled

Discussion in 'Enhanced Search Resolved Bugs' started by Floren, Oct 21, 2014.

  1. Floren

    Floren Well-Known Member

    Once I enable the recency weighted relevance searching option in XenForo 1.4.2, I get this error:
    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.
  2. Mouth

    Mouth Well-Known Member

    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.
    Floren likes this.
  3. Floren

    Floren Well-Known Member

    Unchecking dynamic scripting solved the issue, thank you @Mouth.
    Looking forward to see what @Mike says about the issue, though.
  4. Mike

    Mike XenForo Developer Staff Member

    It's as it says - you have dynamic scripting disabled in ES, so you need to disable the option in XF.
    Floren likes this.
  5. Floren

    Floren Well-Known Member

    Thanks @Mike, I'm not familiar with the new XES release, I ran the old version for a very long time.

Share This Page