Discover Centmin Mod today
Register Now

Xenforo Elasticsearch issue

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

  1. Derek

    Derek New Member

    28
    9
    3
    Aug 5, 2016
    Ratings:
    +16
    Local Time:
    11:04 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 New Member

    28
    9
    3
    Aug 5, 2016
    Ratings:
    +16
    Local Time:
    11:04 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.
     
    • Informative Informative x 1
  3. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,751
    Local Time:
    1:04 PM
    Nginx 1.13.x
    MariaDB 5.5
    Glad you figured it out :D