]> git.koha-community.org Git - koha.git/commit
Bug 22246: Fix indexing of large fields with Elasticsearch
authorEre Maijala <ere.maijala@helsinki.fi>
Fri, 1 Feb 2019 11:18:11 +0000 (13:18 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 12 Mar 2019 08:46:52 +0000 (08:46 +0000)
commit7d741a69919c17f8c8c6a4c965d93c95c2355793
tree529f98ad84549503f7829e6422edfbdb6b8f5609
parenta03d8dd1735520614492aab207a392b957e34630
Bug 22246: Fix indexing of large fields with Elasticsearch

Deduplicate multivalued fields and make sure sort fields are not excessively long. Also updates default mappings so that sort fields are not created for item fields where it doesn't make sense.

Test plan:
1. Reset ES mappings in administration
2. Check that sort is '0' for local-classification in biblio mappings.
3. Change sort back to '1' for local-classification for the next steps.
4. Create a record with 20 items, each with a 100 character long call number
5. Check that when indexed, the record in ES does not have duplicates in any of the item fields and local-classification__sort is truncated to 255 characters.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bd68e2f75b2bd0cae7935715f4aa03342809cb9f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/SearchEngine/Elasticsearch.pm
admin/searchengine/elasticsearch/mappings.yaml
t/Koha/SearchEngine/Elasticsearch.t