Fixed Wrong variable in XenES_Search_SourceHandler_ElasticSearch

PaulB

Well-known member
Affected version
1.1.7
File: library/XenES/Search/SourceHandler/ElasticSearch.php
Line: 1113
Class: XenES_Search_SourceHandler_ElasticSearch
Method: isIndexSuccessful

Problematic line:
PHP:
$typeAndId = XenES_Api::getTypeAndIdFromHit($result);

$record is the wrong variable here and will result in an exception. getTypeAndIdFromHit expects $record to be passed instead.
 
Just to clarify based on something in the original post, $result is the wrong variable. $record is correct. The line should be:
Code:
$typeAndId = XenES_Api::getTypeAndIdFromHit($record);
So fixed now, thanks.

In terms of when this will be triggered, it would generally just cover up another error that has been triggered during bulk indexing, so it definitely shouldn't be common.
 
Top Bottom