]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 17 May 2021 10:34:33 +0000 (12:34 +0200)
commit7e14b054b2fd5b6fddc2046b46d3bd431acf689a
tree6bac2a0c71642ae1e06c84f4c1e24fba144c66ee
parent25b1ada137806b4b57925bd9f584fcdc73f9eaf2
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>
Koha/MetadataRecord/Authority.pm