• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed isIndexSuccessful() not checking ES response correctly on bulk inserts?


Well-known member
XenES 1.1.2

When doing a bulk insert in ES, a response containing "errors": false means all subrequests completed successfully (ElasticSearch reference on bulk insert response).

XenES_Search_SourceHandler_ElasticSearch::isIndexSuccessful contains
if (isset($result->errors) && !$result->errors)
return false;
meaning isIndexSuccessful checks if an "errors" value was set, but then declares it unsuccessful (by returning false) if "errors" is set to false, when it should be declared unsuccessful if "errors" is set to true.

XenES_Search_SourceHandler_ElasticSearch::_triggerFailedIndexError compensates for this with
// no error
Last edited:


XenForo developer
Staff member
I'm not sure why the logic was done like that. It was changed for some API changes with Elasticsearch 1.0/1.1, but it does look backwards, so I've changed it as well.