Bug 28830

Summary: Add CNI (Control Number Identifier) search index (MARC21)
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: SearchingAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: kyle, nick, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on:    
Bug Blocks: 21469, 26314, 27507, 32416, 11175, 31537    
Attachments: Bug 28830: Add cni index for 003
Bug 28830: Add cni index for 003
Bug 28830: Add cni index for 003

Description Martin Renvoize 2021-08-09 11:02:22 UTC
We ought to have a cni index to allow searching on the content of the 003 marc field for accurate linking using UseControlNumber type searches.
Comment 1 Martin Renvoize 2021-08-09 11:08:44 UTC
Created attachment 123616 [details] [review]
Bug 28830: Add cni index for 003

This patch adds the cni/Control-number-identifier index to enable
searches to use the 003 field.

Test plan
1/ Apply patch
2/ Re-index using updated configurations
3/ Confirm cni:number searches yield the expected results
4/ Signoff

Split-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 2 Martin Renvoize 2021-08-09 11:10:08 UTC
This patch was split out of bug 11175 to allow it to be a dependanchy of other bugs without risking hold ups whilst 11175 makes it way through QA.

Signoffs carried across from that bug.
Comment 3 Katrin Fischer 2021-08-10 11:53:57 UTC
Kind of wondering, why it took us THAT long to add this!
Comment 4 Katrin Fischer 2021-08-10 12:02:41 UTC
I checked the LOC documentation, but it appears there is no standard attribute for 003, so using 9014 is fine (https://www.loc.gov/z3950/agency/bib1.html)

Martin, could you please add the indexing changes for Elasticsearch in a follow-up?
Comment 5 Martin Renvoize 2021-08-10 14:13:32 UTC
Created attachment 123697 [details] [review]
Bug 28830: Add cni index for 003

This patch adds the cni/Control-number-identifier index to enable
searches to use the 003 field.

Test plan
1/ Apply patch
2/ Re-index using updated configurations
3/ Confirm cni:number searches yield the expected results
4/ Signoff

Split-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2021-08-10 14:15:14 UTC
Good catch, seems I missed the ES bit from the other bug.. added into the patch :)
Comment 7 Katrin Fischer 2021-08-17 22:24:53 UTC
Created attachment 123920 [details] [review]
Bug 28830: Add cni index for 003

This patch adds the cni/Control-number-identifier index to enable
searches to use the 003 field.

Test plan
1/ Apply patch
2/ Re-index using updated configurations
3/ Confirm cni:number searches yield the expected results
4/ Signoff

Split-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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