Bug 22474 - Authority and biblio field mapping improperly shared
Summary: Authority and biblio field mapping improperly shared
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P3 normal
Assignee: Ere Maijala
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-07 12:37 UTC by Ere Maijala
Modified: 2020-06-04 20:32 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05
Circulation function:


Attachments
Bug 22474: Clone field config before adding fields to it (4.44 KB, patch)
2019-03-07 14:36 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 22474: Clone field config before adding fields to it (4.57 KB, patch)
2019-03-15 10:39 UTC, Björn Nylén
Details | Diff | Splinter Review
Bug 22474: Clone field config before adding fields to it (4.64 KB, patch)
2019-04-15 00:23 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Ere Maijala 2019-03-07 12:37:10 UTC
Reading field mappings uses the general config as the base for both, which makes them accidentally share the field mappings.
Comment 1 Ere Maijala 2019-03-07 14:36:17 UTC
Created attachment 86278 [details] [review]
Bug 22474: Clone field config before adding fields to it

Test plain:

1. Reindex both authorities and biblios with the -d flag to recreate the index, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v -d"
2. Check that authorities only contains authority-specific fields in Elasticsearch e.g. by fetching  http://localhost:9200/koha_dev_authorities/_mappings
3. Reindex both without the -d flag and verify it works, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v"
Comment 2 Björn Nylén 2019-03-15 10:39:24 UTC
Created attachment 86664 [details] [review]
Bug 22474: Clone field config before adding fields to it

Test plain:

1. Reindex both authorities and biblios with the -d flag to recreate the index, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v -d"
2. Check that authorities only contains authority-specific fields in Elasticsearch e.g. by fetching  http://localhost:9200/koha_dev_authorities/_mappings
3. Reindex both without the -d flag and verify it works, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v"

Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Comment 3 Chris Cormack 2019-04-15 00:23:12 UTC
Created attachment 87972 [details] [review]
Bug 22474: Clone field config before adding fields to it

Test plain:

1. Reindex both authorities and biblios with the -d flag to recreate the index, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v -d"
2. Check that authorities only contains authority-specific fields in Elasticsearch e.g. by fetching  http://localhost:9200/koha_dev_authorities/_mappings
3. Reindex both without the -d flag and verify it works, e.g. "perl misc/search_tools/rebuild_elastic_search.pl -v"

Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 4 Nick Clemens (kidclamp) 2019-04-16 13:26:31 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize (ashimema) 2019-04-25 14:05:53 UTC
Pushed to 18.11.x for 18.11.05
Comment 6 Lucas Gass (lukeg) 2019-05-10 20:10:03 UTC
not backporting ES bugs to 18.05.x, not backporting