Bug 31537 - Elasticsearch - index mapping for 003 control-number-identifier is twice in mappings.yaml
Summary: Elasticsearch - index mapping for 003 control-number-identifier is twice in m...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Caroline Cyr La Rose
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 28830
Blocks:
  Show dependency treegraph
 
Reported: 2022-09-08 15:51 UTC by Caroline Cyr La Rose
Modified: 2023-12-28 20:43 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 31537: Elasticsearch - index mapping for 003 control-number-identifier is twice in mappings.yaml (1.45 KB, patch)
2022-09-08 16:13 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 31537: Elasticsearch - index mapping for 003 control-number-identifier is twice in mappings.yaml (1.49 KB, patch)
2022-09-08 20:37 UTC, David Nind
Details | Diff | Splinter Review
Bug 31537: Elasticsearch - index mapping for 003 control-number-identifier is twice in mappings.yaml (1.55 KB, patch)
2022-09-11 13:30 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2022-09-08 15:51:57 UTC
Hi all!

I'm not sure if it's for a specific purpose, but the index mapping for 003 control-number-identifier was added twice in the mappings.yaml file.

In Bug 28830 and Bug 11175.

If it's not necessary that it be there twice, I propose we remove it.
Comment 1 Caroline Cyr La Rose 2022-09-08 16:13:14 UTC
Created attachment 140351 [details] [review]
Bug 31537: Elasticsearch - index mapping for 003 control-number-identifier is twice in mappings.yaml

This patch removes one of the two mappings for the 003 field to the
control-number-identifier index (for MARC21).

To test:
1) Apply patch
2) reindex with mappings reset
3) try to search for cni:code (for example cni:OSt)
--> it should return the desired results
4) try to search for control-number-identifier:code (for example
control-number-identifier:OSt)
--> it should return the desired results
5) Optionally, try the test plan in Bug 11175 to make sure it still
works
Comment 2 Caroline Cyr La Rose 2022-09-08 16:14:16 UTC
(In reply to Caroline Cyr La Rose from comment #0)
 
> If it's not necessary that it be there twice, I propose we remove it.

I mean, remove one of the two!
Comment 3 David Nind 2022-09-08 20:37:38 UTC
Created attachment 140355 [details] [review]
Bug 31537: Elasticsearch - index mapping for 003 control-number-identifier is twice in mappings.yaml

This patch removes one of the two mappings for the 003 field to the
control-number-identifier index (for MARC21).

To test:
1) Apply patch
2) reindex with mappings reset
3) try to search for cni:code (for example cni:OSt)
--> it should return the desired results
4) try to search for control-number-identifier:code (for example
control-number-identifier:OSt)
--> it should return the desired results
5) Optionally, try the test plan in Bug 11175 to make sure it still
works

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2022-09-08 20:38:48 UTC
Testing notes (using koha-testing-docker):

- Followed the test plan, but didn't do optional step 5.
Comment 5 Katrin Fischer 2022-09-11 13:30:45 UTC
Created attachment 140398 [details] [review]
Bug 31537: Elasticsearch - index mapping for 003 control-number-identifier is twice in mappings.yaml

This patch removes one of the two mappings for the 003 field to the
control-number-identifier index (for MARC21).

To test:
1) Apply patch
2) reindex with mappings reset
3) try to search for cni:code (for example cni:OSt)
--> it should return the desired results
4) try to search for control-number-identifier:code (for example
control-number-identifier:OSt)
--> it should return the desired results
5) Optionally, try the test plan in Bug 11175 to make sure it still
works

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2022-09-11 13:35:20 UTC
Stared at this quite a while, wondering if one would be the definition for authorities - but it isn't, just a double up.
Comment 7 Caroline Cyr La Rose 2022-09-12 12:11:25 UTC
(In reply to Katrin Fischer from comment #6)
> Stared at this quite a while, wondering if one would be the definition for
> authorities - but it isn't, just a double up.

Yeah, me too!
Comment 8 Tomás Cohen Arazi 2022-09-12 18:37:29 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!