Join the community today
Become a Member

Xenforo Elasticsearch issue

Discussion in 'Forum software usage' started by Derek, Sep 29, 2016.

  1. Derek

    Derek Member

    47
    9
    8
    Aug 5, 2016
    Ratings:
    +22
    Local Time:
    4:00 PM
    New Xenforo install. Installed Elastisearch from RPM and it seemed to work well:

    Code (Text):
    curl -X GET http://localhost:9200/
    {
      "name" : "Hazard",
      "cluster_name" : "elasticsearch",
      "cluster_uuid" : "W37v8L8jQ0q4P-DHDcmnEA",
      "version" : {
        "number" : "2.4.1",
        "build_hash" : "c67dc32e24162035d18d6fe1e952c4cbcbe79d16",
        "build_timestamp" : "2016-09-27T18:57:55Z",
        "build_snapshot" : false,
        "lucene_version" : "5.5.2"
      },
      "tagline" : "You Know, for Search"
    }
    


    Installed the plugin for xenforo and that seemed to go well, then recreated the search index:

    upload_2016-9-28_17-33-31.png
    But when I try and run a search the site tells me "The search could not be completed. Please try again later." Looking in the logs I see this, and while eventually I will be able to parse this, right now it's just jibberish:

    Code (Text):
    XenForo_Exception: Elasticsearch error: {"root_cause":[{"type":"script_exception","reason":"scripts of type [inline], 
    operation [search] and lang [groovy] are disabled"}],
    "type":"search_phase_execution_exception","reason":"all shards 
    failed","phase":"query","grouped":true,"failed_shards":
    [{"shard":0,"index":"thehighroad","node":"P_-7bfvLSEeXFuQ7yHTpXg",
    "reason":{"type":"query_parsing_exception","reason":"script_score the 
    script could not be loaded","index":"thehighroad","line":1,"col":337,
    "caused_by":{"type":"script_exception","reason":"scripts of type [inline], 
    operation [search] and lang [groovy] are disabled"}}}]} - library/XenES/Search/SourceHandler/ElasticSearch.php:967


    Where's the next place to look?

     
  2. Derek

    Derek Member

    47
    9
    8
    Aug 5, 2016
    Ratings:
    +22
    Local Time:
    4:00 PM
    I figured it out. It was a settings issue - the option that offered a half-life of 365 days by default to give some recency bias to searches that were sorted on relevance apparently breaks things. Or it breaks things the way I enabled it.
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,797
    12,271
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,857
    Local Time:
    6:00 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Glad you figured it out :D