]> git.koha-community.org Git - koha.git/commit
Bug 32250: Only reindex records when commiting
authorNick Clemens <nick@bywatersolutions.com>
Fri, 13 Jan 2023 20:07:01 +0000 (20:07 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 11 May 2023 11:15:44 +0000 (12:15 +0100)
commit1078a907ac50c1f624709031f50ff95505008d52
tree12183eb45fa784be95b1e1437b3506814943eb08
parenta6a39047f311952cadee31f5929c0ec4db0a63e9
Bug 32250: Only reindex records when commiting

This patch adds an array to catch updated bibs, and defers indexing until a
batch of changes is committed

To test:
1 - Set LinkerModule system preference to either first or last match
    Alternate this between runs of the linker to ensure changes are made
2 - Set SearchEngine to Elasticsearch and reindex (to ensure index is built)
3 - perl  misc/link_bibs_to_authorities.pl -v
4 - Check Admin->Jobs and see that many ES index jobs are queued
5 - Apply patch
6 - perl  misc/link_bibs_to_authorities.pl -v
7 - Check Admin->Jobs and see that 1 index per commit from is enqueued

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cacc16c659ba64ea75602c5122e87c8337a11bbe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/link_bibs_to_authorities.pl