summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-01-04 22:02:54 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2016-01-04 22:02:54 +0100
commit46956395e90f013926aa079329284bf309c1ec8c (patch)
tree25bbc6b29da6649ffc58851a83f1cef73670518c /service
parent9ae1c6042f9c9d8d3e07215a9222ffccdd5fa3f3 (diff)
update item ids in batches
Diffstat (limited to 'service')
-rw-r--r--service/itemservice.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/service/itemservice.php b/service/itemservice.php
index ec6bee8bd..95a07d425 100644
--- a/service/itemservice.php
+++ b/service/itemservice.php
@@ -260,14 +260,7 @@ class ItemService extends Service {
* Regenerates the search index for all items
*/
public function generateSearchIndices() {
- $rows = $this->itemMapper->findAllItemIdsAndUsers();
-
- foreach ($rows as $row) {
- $item = $this->find($row['id'], $row['user_id']);
- $item->generateSearchIndex();
- $this->itemMapper->update($item);
- }
-
+ $this->itemMapper->updateSearchIndices();
}
}