Fixed Server Error Log

Nirjonadda

Well-known member
I am getting this Server Error Log with Elasticsearch v5 and XenForo Enhanced Search 1.1.6

PHP:
Error Info
XenForo_Exception: Elasticsearch error: {"root_cause":[{"type":"parsing_exception","reason":"The field [fields] is no longer supported, please use [stored_fields] to retrieve stored fields or _source filtering if the field is not stored","line":1,"col":46}],"type":"parsing_exception","reason":"The field [fields] is no longer supported, please use [stored_fields] to retrieve stored fields or _source filtering if the field is not stored","line":1,"col":46} - library/XenES/Search/SourceHandler/ElasticSearch.php:996
Generated By: Unknown Account, 2 minutes ago
Stack Trace

#0 /home/nadda/public_html/library/XenES/Search/SourceHandler/ElasticSearch.php(670): XenES_Search_SourceHandler_ElasticSearch->_logSearchResponseError(Object(stdClass), true)
#1 /home/nadda/public_html/library/XenForo/ControllerPublic/Member.php(701): XenES_Search_SourceHandler_ElasticSearch->executeSearchByUserId(15054, 0, 15)
#2 /home/nadda/public_html/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Member->actionRecentContent()
#3 /home/nadda/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/nadda/public_html/index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array(3) {
  ["url"] => string(66) "http://www.nirmoladda.com/members/modon-kumer.15054/recent-content"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Can you please reupload the latest XFES files? Have you disabled stat checking in your opcode cache?
 
As a workaround, in library/XenES/Search/SourceHandler/ElasticSearch.php, you can change:
Code:
'fields' => array(),
to:
Code:
'docvalue_fields' => array(),
That should resolve the issue.
 
That fix should work if you know you're running Elasticsearch 5 (which is the only version that needs it).

The full fix is a bit more complex. As of this message, it has been incorporated into the XFES 1.1.6 download, so you only need to take action if you explicitly get an error here. You can either use the workaround above or replace library/XenES/Search/SourceHandler/ElasticSearch.php with the version from a newly downloaded XFES 1.1.6 version.
 
As a workaround, in library/XenES/Search/SourceHandler/ElasticSearch.php, you can change:
Code:
'fields' => array(),
to:
Code:
'docvalue_fields' => array(),
That should resolve the issue.

Do you updated latest XFES files with this change?
 
Top Bottom