In addition to what brogan said, for extra peace of mind try searching for small (e.g. 3 letter) words.Elasticsearch and Enhanced Search are installed and enabled. How can I tell if it is actually working and not just the regular search running?
Are you running elasticsearch 2.0?
There's a fix here for that: https://xenforo.com/community/threads/elasticsearch-2-0-error.107641/
@@ -214,15 +214,36 @@
else
{
$script = "_score / pow(2.0f, min(10.0f * halflife, abs(now - doc['date'].value + .0f)) / (halflife + .0f))";
}
+ $scriptType = 'inline';
}
else
{
$script = 'xf-date-weighted';
- }
-
- if ($version >= '1.0')
+ $scriptType = 'file';
+ }
+
+ if ($version >= '2.0')
+ {
+ $dsl['query'] = array(
+ 'function_score' => array(
+ 'boost_mode' => 'replace',
+ 'query' => $dsl['query'],
+ 'script_score' => array(
+ 'script' => array(
+ 'params' => array(
+ 'now' => XenForo_Application::$time,
+ 'halflife' => 86400 * $weightedRelevance['halfLifeDays']
+ ),
+ 'lang' => $language,
+ $scriptType => $script
+ )
+ )
+ )
+ );
+ }
+ else if ($version >= '1.0')
{
$dsl['query'] = array(
'function_score' => array(
'boost_mode' => 'replace',
You can restore the original file from the .zip archive if you think you've edited it incorrectly.
Make sure you use an editor such as Notepad++ and save it as UTF-8 without BOM.
Error Info
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":"ak_audiokarma","node":"NUZDtjtVTCuEkWo66xgMxw","reason":{"type":"query_parsing_exception","reason":"script_score the script could not be loaded","index":"ak_audiokarma","line":1,"col":328,"caused_by":{"type":"script_exception","reason":"scripts of type [inline], operation [search] and lang [groovy] are disabled"}}}]} - library/XenES/Search/SourceHandler/ElasticSearch.php:871
Generated By: Wardsweb, 4 minutes ago
Stack Trace
#0 /chroot/home/ak/audiokarma.org/html/forums/library/XenES/Search/SourceHandler/ElasticSearch.php(325): XenES_Search_SourceHandler_ElasticSearch->_logSearchResponseError(Object(stdClass), true)
#1 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/Search/SourceHandler/Abstract.php(115): XenES_Search_SourceHandler_ElasticSearch->executeSearch('wardsweb', true, Array, Array, false, '200')
#2 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/Search/Searcher.php(79): XenForo_Search_SourceHandler_Abstract->searchGeneral('wardsweb', Array, 'relevance', '200')
#3 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/ControllerPublic/Search.php(246): XenForo_Search_Searcher->searchGeneral('wardsweb', Array, 'relevance')
#4 /chroot/home/ak/audiokarma.org/html/forums/library/XenES/Proxy/ControllerSearch.php(30): XenForo_ControllerPublic_Search->actionSearch()
#5 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/FrontController.php(351): XenES_Proxy_ControllerSearch->actionSearch()
#6 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /chroot/home/ak/audiokarma.org/html/forums/index.php(13): XenForo_FrontController->run()
#8 {main}
Request State
array(3) {
["url"] => string(52) "http://audiokarma.org/forums/index.php?search/search"
["_GET"] => array(1) {
["search/search"] => string(0) ""
}
["_POST"] => array(5) {
["keywords"] => string(8) "wardsweb"
["title_only"] => string(1) "1"
["users"] => string(0) ""
["date"] => string(0) ""
["_xfToken"] => string(8) "********"
}
}
Delete... Close
https://xenforo.com/community/threads/elasticsearch-2-0-error.107641/I found a "+" that got copied over when editing the file. Now when I enable the enhanced search and tried a search, it returns the forum title with an error "Audiokarma Home Audio Stereo Discussion Forums - Error"
The server log has this:
Code:Error Info 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":"ak_audiokarma","node":"NUZDtjtVTCuEkWo66xgMxw","reason":{"type":"query_parsing_exception","reason":"script_score the script could not be loaded","index":"ak_audiokarma","line":1,"col":328,"caused_by":{"type":"script_exception","reason":"scripts of type [inline], operation [search] and lang [groovy] are disabled"}}}]} - library/XenES/Search/SourceHandler/ElasticSearch.php:871 Generated By: Wardsweb, 4 minutes ago Stack Trace #0 /chroot/home/ak/audiokarma.org/html/forums/library/XenES/Search/SourceHandler/ElasticSearch.php(325): XenES_Search_SourceHandler_ElasticSearch->_logSearchResponseError(Object(stdClass), true) #1 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/Search/SourceHandler/Abstract.php(115): XenES_Search_SourceHandler_ElasticSearch->executeSearch('wardsweb', true, Array, Array, false, '200') #2 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/Search/Searcher.php(79): XenForo_Search_SourceHandler_Abstract->searchGeneral('wardsweb', Array, 'relevance', '200') #3 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/ControllerPublic/Search.php(246): XenForo_Search_Searcher->searchGeneral('wardsweb', Array, 'relevance') #4 /chroot/home/ak/audiokarma.org/html/forums/library/XenES/Proxy/ControllerSearch.php(30): XenForo_ControllerPublic_Search->actionSearch() #5 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/FrontController.php(351): XenES_Proxy_ControllerSearch->actionSearch() #6 /chroot/home/ak/audiokarma.org/html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch)) #7 /chroot/home/ak/audiokarma.org/html/forums/index.php(13): XenForo_FrontController->run() #8 {main} Request State array(3) { ["url"] => string(52) "http://audiokarma.org/forums/index.php?search/search" ["_GET"] => array(1) { ["search/search"] => string(0) "" } ["_POST"] => array(5) { ["keywords"] => string(8) "wardsweb" ["title_only"] => string(1) "1" ["users"] => string(0) "" ["date"] => string(0) "" ["_xfToken"] => string(8) "********" } } Delete... Close
Yes, have a look at the other messages in that thread. You'll see the same error you are getting now, with the fix I posted.Thanks but my error is after I manually edited the file using Mike's ESFIX.diff Is there something else I'm missing?
Yes, have a look at the other messages in that thread. You'll see the same error you are getting now, with the fix I posted.
We use essential cookies to make this site work, and optional cookies to enhance your experience.