Bug 36952 - Add 370 to authority index (MARC21)
Summary: Add 370 to authority index (MARC21)
Status: RESOLVED 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: 2024-05-23 18:33 UTC by Caroline Cyr La Rose
Modified: 2024-07-20 01:35 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds field 370 (associated place) to the default MARC21 authority index mappings when using Elasticsearch or Open Search (it is already indexed if using Zebra).
Version(s) released in:
24.11.00
Circulation function:


Attachments
MARC file to test (689 bytes, text/plain)
2024-05-23 20:06 UTC, Caroline Cyr La Rose
Details
Bug 36952: Add 370 to authority index (MARC21) (1.50 KB, patch)
2024-05-23 20:14 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 36952: Add 370 to authority index (MARC21) (1.55 KB, patch)
2024-05-23 21:35 UTC, David Nind
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 2024-05-23 18:33:48 UTC
In order to be able to search authors by place (place of birth, place of death, place of residence, etc.) we'd need to index the 370 authority field. This would allow librarians to search in the "entire record" for a place and find related authors.

https://www.loc.gov/marc/authority/ad370.html
Comment 1 Caroline Cyr La Rose 2024-05-23 20:06:32 UTC
Created attachment 167129 [details]
MARC file to test

To recreate:
1. Import the attached .mrc file
2. Go to Authorities
3. Search 'Main heading' for quebec
   --> 1 result (normal)
4. Search 'Entire record' for quebec
   --> 1 result (we'd like 2 results here)
Comment 2 Caroline Cyr La Rose 2024-05-23 20:14:18 UTC
Created attachment 167133 [details] [review]
Bug 36952: Add 370 to authority index (MARC21)

This enhancement adds field 370 to MARC21 default authority
index mappings.

To test:
1. Import the attached .mrc file
2. Go to Authorities
3. Search 'Main heading' for quebec
   --> 1 result (normal)
4. Search 'Entire record' for quebec
   --> 1 result
5. Go to the OPAC > Authority search
6. Redo steps 3 and 4
   --> Same results
7. Apply patch
8. Reindex authorities (in KTD shell:
   koha-elasticsearch --rebuild -a -v -r kohadev)
9. Redo step 3
   --> Still 1 result (normal)
10. Redo step 4
    --> 2 results
11. Redo step 5-6
    --> Same results as steps 9-10
Comment 3 Caroline Cyr La Rose 2024-05-23 20:37:43 UTC
I named the index purposefully vague - simply "Place" - in case we want to eventually add 371 (Address) as well. It also somewhat mirrors the bibliographic "pl" index for publication place and the "Places" facet for su-geo. I'm open to other name suggestions, if necessary.
Comment 4 David Nind 2024-05-23 21:35:48 UTC
Created attachment 167139 [details] [review]
Bug 36952: Add 370 to authority index (MARC21)

This enhancement adds field 370 to MARC21 default authority
index mappings.

To test:
1. Import the attached .mrc file
2. Go to Authorities
3. Search 'Main heading' for quebec
   --> 1 result (normal)
4. Search 'Entire record' for quebec
   --> 1 result
5. Go to the OPAC > Authority search
6. Redo steps 3 and 4
   --> Same results
7. Apply patch
8. Reindex authorities (in KTD shell:
   koha-elasticsearch --rebuild -a -v -r kohadev)
9. Redo step 3
   --> Still 1 result (normal)
10. Redo step 4
    --> 2 results
11. Redo step 5-6
    --> Same results as steps 9-10

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2024-05-23 21:37:36 UTC
Testing notes (using KTD):

1. Start up KTD with Elasticsearch: ktd --es8 up

2. Initially tested with Zebra (didn't read the bug properly!), and couldn't see the issue - Zebra already returns the correct results.
Comment 6 Caroline Cyr La Rose 2024-05-24 13:04:11 UTC
Oh yes, thanks David, I forgot to specify ES other than in the component. It's good to know that Zebra already returns it, however, it's a point in my favour ;) I was looking at the Zebra config and couldn't find 370, but iirc Zebra indexed the whole record regardless.
Comment 7 Katrin Fischer 2024-06-27 15:14:29 UTC
Picked from QA queue for pushing to main.
Comment 8 Katrin Fischer 2024-06-27 15:26:53 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 9 Lucas Gass (lukeg) 2024-07-19 15:48:34 UTC
Enhancement will not be backported to 24.05.x