Skip to content

Commit 272cfe1

Browse files
committed
Better batch query
1 parent 775dc60 commit 272cfe1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

module/VuFind/src/VuFind/ILS/Driver/Folio.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,9 @@ protected function getByBatch($ids, $idField, $responseKey, $endpoint, $querySuf
524524
return;
525525
}
526526
foreach (array_chunk($ids, self::QUERY_BY_IDS_BATCH_SIZE) as $idsInBatch) {
527-
$itemQueries = array_map(fn ($id) => $idField . '=="' . $this->escapeCql($id) . '"', $idsInBatch);
527+
$idsWithQuotes = array_map(fn ($id) => '"' . $this->escapeCql($id) . '"', $idsInBatch);
528528
$query = [
529-
'query' => '(' . implode(' OR ', $itemQueries) . ')' . $querySuffix,
529+
'query' => $idField . ' == (' . implode(' OR ', $idsWithQuotes) . ')' . $querySuffix,
530530
];
531531
foreach (
532532
$this->getPagedResults(

0 commit comments

Comments
 (0)