Recency weighted relevance searching

ungovernable

Active member
I spent hours trying to fix this with my server management company without finding a solution so i really hope i can get support here.

I bought Elastic Search and got it configured correctly on the server. It's working fine until i enable this option:
Enable recency weighted relevance searching with specified half-life (days): 365

As soon as i enable this option, all search will return this error:
The search could not be completed. Please try again later.

I have rebuilt search cache countless of times but it doesnt change anything


Code:
Server Error Log
Error Info
XenForo_Exception: Elasticsearch error: SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[xVCfVmcdSwG_p010NlZPTw][anarchop_apn][0]: QueryPhaseExecutionException[[anarchop_apn][0]: query[function score (filtered((title:punk^3.0 | message:punk))->+cache(_type:post) cache(_type:thread),function=script[xf-date-weighted], params [{now=1496809881, halflife=31536000}])],from[0],size[8000],sort[<score>,<custom:"date": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@36536770>!]: Query Failed [Failed to execute main query]]; nested: GroovyScriptExecutionException[MissingPropertyException[No such property: xf for class: bbd027383bd3132a8f12db815e1f96f3795541ac]]; }{[xVCfVmcdSwG_p010NlZPTw][anarchop_apn][1]: QueryPhaseExecutionException[[anarchop_apn][1]: query[function score (filtered((title:punk^3.0 | message:punk))->+cache(_type:post) cache(_type:thread),function=script[xf-date-weighted], params [{now=1496809881, halflife=31536000}])],from[0],size[8000],sort[<score>,<custom:"date": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@c30d3c>!]: Query Failed [Failed to execute main query]]; nested: GroovyScriptExecutionException[MissingPropertyException[No such property: xf for class: bbd027383bd3132a8f12db815e1f96f3795541ac]]; }{[xVCfVmcdSwG_p010NlZPTw][anarchop_apn][2]: QueryPhaseExecutionException[[anarchop_apn][2]: query[function score (filtered((title:punk^3.0 | message:punk))->+cache(_type:post) cache(_type:thread),function=script[xf-date-weighted], params [{now=1496809881, halflife=31536000}])],from[0],size[8000],sort[<score>,<custom:"date": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@63f7457c>!]: Query Failed [Failed to execute main query]]; nested: GroovyScriptExecutionException[MissingPropertyException[No such property: xf for class: bbd027383bd3132a8f12db815e1f96f3795541ac]]; }{[xVCfVmcdSwG_p010NlZPTw][anarchop_apn][3]: QueryPhaseExecutionException[[anarchop_apn][3]: query[function score (filtered((title:punk^3.0 | message:punk))->+cache(_type:post) cache(_type:thread),function=script[xf-date-weighted], params [{now=1496809881, halflife=31536000}])],from[0],size[8000],sort[<score>,<custom:"date": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@237b7244>!]: Query Failed [Failed to execute main query]]; nested: GroovyScriptExecutionException[MissingPropertyException[No such property: xf for class: bbd027383bd3132a8f12db815e1f96f3795541ac]]; }{[xVCfVmcdSwG_p010NlZPTw][anarchop_apn][4]: QueryPhaseExecutionException[[anarchop_apn][4]: query[function score (filtered((title:punk^3.0 | message:punk))->+cache(_type:post) cache(_type:thread),function=script[xf-date-weighted], params [{now=1496809881, halflife=31536000}])],from[0],size[8000],sort[<score>,<custom:"date": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@1a8f7c50>!]: Query Failed [Failed to execute main query]]; nested: GroovyScriptExecutionException[MissingPropertyException[No such property: xf for class: bbd027383bd3132a8f12db815e1f96f3795541ac]]; }] - library/XenES/Search/SourceHandler/ElasticSearch.php:1002

Stack Trace
#0 /home/anarchopunk/public_html/library/XenES/Search/SourceHandler/ElasticSearch.php(361): XenES_Search_SourceHandler_ElasticSearch->_logSearchResponseError(Object(stdClass), true)
#1 /home/anarchopunk/public_html/library/XenForo/Search/SourceHandler/Abstract.php(152): XenES_Search_SourceHandler_ElasticSearch->executeSearch('punk', false, Array, Array, 'thread', '2000', Object(XenForo_Search_DataHandler_Post))
#2 /home/anarchopunk/public_html/library/XenForo/Search/Searcher.php(111): XenForo_Search_SourceHandler_Abstract->searchType(Object(XenForo_Search_DataHandler_Post), 'punk', Array, 'relevance', 1, '2000')
#3 /home/anarchopunk/public_html/library/XenForo/ControllerPublic/Search.php(249): XenForo_Search_Searcher->searchType(Object(XenForo_Search_DataHandler_Post), 'punk', Array, 'relevance', 1)
#4 /home/anarchopunk/public_html/library/XenMods/ElasticEss/XenForo/ControllerPublic/Search.php(119): XenForo_ControllerPublic_Search->actionSearch()
#5 /home/anarchopunk/public_html/library/fgX/SearchResultsAsThreads/XenForo/ControllerPublic/Search.php(24): XenMods_ElasticEss_XenForo_ControllerPublic_Search->actionSearch()
#6 /home/anarchopunk/public_html/library/Andy/SearchLog/ControllerPublic/Search.php(8): fgX_SearchResultsAsThreads_XenForo_ControllerPublic_Search->actionSearch()
#7 /home/anarchopunk/public_html/library/XenES/Proxy/ControllerSearch.php(34): Andy_SearchLog_ControllerPublic_Search->actionSearch()
#8 /home/anarchopunk/public_html/library/XenForo/FrontController.php(351): XenES_Proxy_ControllerSearch->actionSearch()
#9 /home/anarchopunk/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/anarchopunk/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}

fef7a6d64ad84f818d6aa6181df57d59.png





ea9da6df1e2a46caac1f500f4359972b.png
 
You either need to check "use dynamic scripting in elasticsearch" which requires enabling (and then restarting) in modern versions of Elastic Search, or copy the contents of the _script folder to /etc/elasticsearch/scripts and restart elasticsearch.
 
Top Bottom