mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 21:36: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;
|
$offset = 0;
|
||||||
$limit = $this->getLimit();
|
$limit = $this->getLimit();
|
||||||
|
|
||||||
while (($records = $this->getRecords($offset, $limit)) !== []) {
|
while (($records = $this->getRecords($offset, $limit)) !== null) {
|
||||||
|
if ($records !== []) {
|
||||||
yield $records;
|
yield $records;
|
||||||
|
}
|
||||||
$offset += $limit;
|
$offset += $limit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue