mirror of
https://github.com/Codappix/search_core.git
synced 2024-12-22 20:56:10 +01:00
BUGFIX: Dont stop loop on empty array
If the fetched record batch gets emptied because of the rootline filter the loop gets interrupted and lasting records may get skipped from further processing
This commit is contained in:
parent
8eecdff01e
commit
dfc82538ef
1 changed files with 4 additions and 2 deletions
|
@ -119,8 +119,10 @@ abstract class AbstractIndexer implements IndexerInterface
|
|||
$offset = 0;
|
||||
$limit = $this->getLimit();
|
||||
|
||||
while (($records = $this->getRecords($offset, $limit)) !== []) {
|
||||
yield $records;
|
||||
while (($records = $this->getRecords($offset, $limit)) !== null) {
|
||||
if ($records !== []) {
|
||||
yield $records;
|
||||
}
|
||||
$offset += $limit;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue