Fix results aggregation in SolrIndex (ArrayAccess broken)
Needs to use push() explicitly, native operators don't seem to work on ArrayList (see http://open.silverstripe.org/ticket/7686)
This commit is contained in:
parent
4766794cea
commit
b6aa87d116
|
@ -268,9 +268,9 @@ abstract class SolrIndex extends SearchIndex {
|
||||||
|
|
||||||
foreach ($res->response->docs as $doc) {
|
foreach ($res->response->docs as $doc) {
|
||||||
$result = DataObject::get_by_id($doc->ClassName, $doc->ID);
|
$result = DataObject::get_by_id($doc->ClassName, $doc->ID);
|
||||||
if ($result) $results[] = $result;
|
if($result) $results->push($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = array();
|
$ret = array();
|
||||||
$ret['Matches'] = new PaginatedList($results);
|
$ret['Matches'] = new PaginatedList($results);
|
||||||
$ret['Matches']->setLimitItems(false);
|
$ret['Matches']->setLimitItems(false);
|
||||||
|
|
Loading…
Reference in New Issue