Bug 28393

Summary: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: Searching - ElasticsearchAssignee: Caroline Cyr La Rose <caroline.cyr-la-rose>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: david
Version: master   
Hardware: All   
OS: All   
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
Attachments: Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)
Bug 28393: Elasticsearch - Add 050a to lc-call-number index mapping (MARC21)

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!