]> git.koha-community.org Git - koha.git/commit
Bug 28268: Improve memory usage when indexing authorities in Elasticsearch
authorEre Maijala <ere.maijala@helsinki.fi>
Fri, 30 Apr 2021 07:00:23 +0000 (10:00 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 18 May 2021 10:17:33 +0000 (12:17 +0200)
commitbf63a2f6b005ebea03072b5745f216b40290fa46
tree35345e4ed7f96e55312f708834dd9e46249c1319
parent530cb25fcf2c560f36ad80b5223fa440ee3fde06
Bug 28268: Improve memory usage when indexing authorities in Elasticsearch

Retrieves the complete records one by one to avoid huge memory usage.

Note that this removes the call to GuessAuthTypeCode, but it is done later in Koha::SearchEngine::Elasticsearch::marc_records_to_documents (and was never done if you asked to index a single record with --authid parameter).

Test plan:
1. Apply patch
2. Reindex authorities: perl misc/search_tools/rebuild_elasticsearch.pl -a -d -v
3. Check that indexing completed successfully and results are correct.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7e14b054b2fd5b6fddc2046b46d3bd431acf689a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/MetadataRecord/Authority.pm