Bug 28393 - Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)
Summary: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Caroline Cyr La Rose
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-19 16:06 UTC by Caroline Cyr La Rose
Modified: 2022-12-12 21:24 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds 050$a (Library of Congress classification number) to the lc-call-number index mapping when using Elasticsearch. These means that when searching using lc-call-number both 050$a and 050$b (Library of Congress item number) are now searchable.
Version(s) released in:
21.11.00
Circulation function:


Attachments
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21) (849 bytes, patch)
2021-05-19 16:32 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21) (1.33 KB, patch)
2021-08-08 10:39 UTC, David Nind
Details | Diff | Splinter Review
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21) (1.38 KB, patch)
2021-08-10 11:29 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 2021-05-19 16:06:46 UTC
I think this is a simple omission, but currently the lc-call-number index is only mapped to 050 $b and not 050 $a.
Comment 1 Caroline Cyr La Rose 2021-05-19 16:09:19 UTC
I'm not sure what the difference is between the ones that have subfields specified and those that only have a field.

e.g. lc-call-number 050b
but
dewey-classification 082

Why is dewey-classification mapped to the whole of 082, but lc-call-number is only mapped to 050b?
Comment 2 Caroline Cyr La Rose 2021-05-19 16:32:44 UTC
Created attachment 121188 [details] [review]
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)

This patch adds 050 $a to the mapping for the lc-call-number index.

To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings" 
and confirm
2b) Then reindex

I'm not sure how to search specifically for an LC call number.
You can confirm that 050 $a is displayed in the Search engine configuration page.
Comment 3 David Nind 2021-08-08 10:39:31 UTC
Created attachment 123597 [details] [review]
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)

This patch adds 050 $a to the mapping for the lc-call-number index.

To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex

I'm not sure how to search specifically for an LC call number.
You can confirm that 050 $a is displayed in the Search engine configuration page.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2021-08-08 10:44:54 UTC
I managed to search us lc-call-number=X (where X - the either the 050$a or $050$b from a record - didn't work for 50$a before, but did after applying patch, resetting mapping, and reindexing.
Comment 5 Katrin Fischer 2021-08-10 11:29:08 UTC
Created attachment 123675 [details] [review]
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)

This patch adds 050 $a to the mapping for the lc-call-number index.

To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings"
and confirm
2b) Then reindex

I'm not sure how to search specifically for an LC call number.
You can confirm that 050 $a is displayed in the Search engine configuration page.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2021-08-16 10:05:03 UTC
Pushed to master for 21.11, thanks to everybody involved!