Bug 23053

Summary: Local-Number cannot be used for authority matching due to non-existence of 'phrase' index
Product: Koha Reporter: Nick Clemens <nick>
Component: MARC Authority data supportAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: dcook, fridolin.somers, lucas, m.de.rooy, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.01
Attachments: Bug 23053: Add phrase index to authority Local-Number
Bug 23053: Add phrase index to authority Local-Number
Bug 23053: Add phrase index to authority Local-Number
Bug 23053: [follow-up] Same changes for UNIMARC

Description Nick Clemens 2019-06-05 13:53:13 UTC
Bug 21581 ensured that we can pass authority indexes through to the authorities search for matching, however, when searching in Zebra we deault to using:
@attr 6=3

This seems to be equivalent to searching 'phrase' index for a field:
See section 2.4.5
https://software.indexdata.com/zebra/doc/querymodel-rpn.html

It seems Local-Number does not support phrase searching currently

To recreate:
1 - Define a matching rule for authorities on field 001 index Local-Number
2 - In koha-conf.xml raise the zebra_loglevels
     <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
3 - Export some authorities using the tools->export data
4 - Import those authorities
5 - Note no matches found
6 - View the zebra output log, you should see lots of error 114
Comment 1 Nick Clemens 2019-06-05 14:01:05 UTC
Created attachment 90336 [details] [review]
Bug 23053: Add phrase index to authority Local-Number

To test:
 1 - Define a matching rule for authorities on field 001 index Local-Number
 2 - In koha-conf.xml raise the zebra_loglevels
     <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 3 - Export some authorities using the tools->export data
 4 - Import those authorities
 5 - Note no matches found
 6 - View the zebra output log, you should see lots of error 114
 7 - Apply patch
 8 - Copy the indexdefs files to the installed versions
 9 - Reapply matchign rules to staged files
10 - Matches should now be found
11 - Logs should not have errors
Comment 2 Claire Gravely 2019-06-07 10:24:59 UTC
Created attachment 90412 [details] [review]
Bug 23053: Add phrase index to authority Local-Number

To test:
 1 - Define a matching rule for authorities on field 001 index Local-Number
 2 - In koha-conf.xml raise the zebra_loglevels
     <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 3 - Export some authorities using the tools->export data
 4 - Import those authorities
 5 - Note no matches found
 6 - View the zebra output log, you should see lots of error 114
 7 - Apply patch
 8 - Copy the indexdefs files to the installed versions
 9 - Reapply matchign rules to staged files
10 - Matches should now be found
11 - Logs should not have errors

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 3 Katrin Fischer 2019-06-09 20:15:55 UTC
Created attachment 90446 [details] [review]
Bug 23053: Add phrase index to authority Local-Number

To test:
 1 - Define a matching rule for authorities on field 001 index Local-Number
 2 - In koha-conf.xml raise the zebra_loglevels
     <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 3 - Export some authorities using the tools->export data
 4 - Import those authorities
 5 - Note no matches found
 6 - View the zebra output log, you should see lots of error 114
 7 - Apply patch
 8 - Copy the indexdefs files to the installed versions
 9 - Reapply matchign rules to staged files
10 - Matches should now be found
11 - Logs should not have errors

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2019-06-11 07:38:03 UTC
Nice work!

Pushed to master for 19.11.00
Comment 5 Martin Renvoize 2019-06-11 09:24:12 UTC
Nice work!

Pushed to master for 19.11.00
Comment 6 Fridolin Somers 2019-06-11 15:28:14 UTC
Should'nt it also be added to UNIMARC ?
Comment 7 Nick Clemens 2019-06-12 12:39:52 UTC
Created attachment 90530 [details] [review]
Bug 23053: [follow-up] Same changes for UNIMARC
Comment 8 Martin Renvoize 2019-06-13 13:38:27 UTC
Nice work!

Pushed to master for 19.11.00
Comment 9 Martin Renvoize 2019-06-13 13:39:03 UTC
Followup pushed
Comment 10 Fridolin Somers 2019-06-17 07:32:49 UTC
Pushed to 19.05.x for 19.05.01
Comment 11 Lucas Gass 2019-06-19 19:21:15 UTC
backported to 18.11.x for 18.11.07