Bug 36952

Summary: Add 370 to authority index (MARC21)
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: Searching - ElasticsearchAssignee: Caroline Cyr La Rose <caroline.cyr-la-rose>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: david, lucas
Version: Main   
Hardware: All   
OS: All   
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
Bug 36952: Add 370 to authority index (MARC21)
Bug 36952: Add 370 to authority index (MARC21)

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