]> 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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 5 May 2023 12:13:22 +0000 (09:13 -0300)
commitcacc16c659ba64ea75602c5122e87c8337a11bbe
treec0d623e345be74f95ad51f55c62328294bfc885e
parentd29e5c6e0f3e43b8598cfce6b06f45605fc7a84e
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>
misc/link_bibs_to_authorities.pl