Elasticsearch running - but XF won't reindex

CTXMedia

Well-known member
I've enabled elasticsearch in the Options > Search settings and set stemming in the tools page, but when I click to reindex it tells me it cannot find elasticsearch:

No response returned from Elasticsearch. Is it running?

It is running on the server - any advice on what to look at first?

Thanks,
Shaun :D
 
error on create cache
Informação do Erro
ErrorException: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: Invalid UTF-8 sequence in argument - library/XenES/Api.php:96

Rastreamento de Pilha
#0 [internal function]: XenForo_Application::handlePhpError(2, 'json_encode() [...', '/home/website/p...', 96, Array)
#1 /home/website/public_html/library/XenES/Api.php(96): json_encode(Array)
#2 /home/website/public_html/library/XenES/Search/SourceHandler/ElasticSearch.php(66): XenES_Api::indexBulk('database_xf', 'post', Array)
#3 /home/website/public_html/library/XenForo/Search/Indexer.php(125): XenES_Search_SourceHandler_ElasticSearch->finalizeRebuildSet()
#4 /home/website/public_html/library/XenForo/CacheRebuilder/SearchIndex.php(93): XenForo_Search_Indexer->finalizeRebuildSet()
#5 /home/website/public_html/library/XenForo/ControllerHelper/CacheRebuild.php(26): XenForo_CacheRebuilder_SearchIndex->rebuild(1, Array, NULL)
#6 /home/website/public_html/library/XenForo/ControllerAdmin/Tools.php(78): XenForo_ControllerHelper_CacheRebuild->rebuildCache(Array, 'http://www....', 'admin.php?tools...', true)
#7 /home/website/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerAdmin_Tools->actionCacheRebuild()
#8 /home/website/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/website/public_html/admin.php(13): XenForo_FrontController->run()
#10 {main}
Solicitar Estado
array(3) {
["url"] => string(55) "http://www.website.com/admin.php?tools/cache-rebuild"
["_GET"] => array(1) {
["tools/cache-rebuild"] => string(0) ""
}
["_POST"] => array(5) {
["process"] => string(1) "1"
["caches"] => string(150) "[["SearchIndex",{"batch":500,"start":66,"extra_data":{"content_types":["profile_post","thread"],"current_type":"post","type_start":33014},"delay":0}]]"
["position"] => string(1) "1"
["redirect"] => string(49) "http://www.website.com/admin.php?tools/rebuild"
["_xfToken"] => string(53) "1,1332247031,0a5de608c5e7e5b76e9aa074b9de67bca1e39109"
}
}
 
# php -v
PHP 5.3.10 (cli) (built: Mar 9 2012 13:58:55)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v1.3.2, Copyright (c) 2005-2011, by mOo
 
# php -v
PHP 5.3.10 (cli) (built: Mar 9 2012 13:58:55)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v1.3.2, Copyright (c) 2005-2011, by mOo

So your php version is fine.

I would suggest creating a bug report here: http://xenforo.com/community/forums/enhanced-search-bug-reports.57/



A quick look at line 96 of library/XenES/Api.php, maybe this would work for you (be warned, no guarantees as i'm only guessing here)

Change

Code:
json_encode($content);

to

Code:
json_encode(utf8_encode($content));
 
unfortunately, it did not work ...

the more strange that everything works perfectly, when you get close to 32,000 records post it gives this error ... worse and everything is working perfectly.
 
unfortunately,it did not work...

the morestrange thateverything works perfectly,when you getclose to32,000records postit givesthis error...worseandeverything is working perfectly.

The problems been caused by an invalid utf-8 character which will be in one of your posts around the 32k mark.

your best bet is to raise an official support ticket and report it as a bug.
 
Finally, after a few hours racking my brain ... actually the problem was the record in the database .. I found all the 84 records that were not converted properly to UTF-8, but after several minutes (I did all manual editing to fix the DB) everything was working perfectly.

Thanks Slavik
 
Top Bottom