https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41795

--- Comment #3 from Andreas Roussos <[email protected]> ---
Created attachment 192689
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192689&action=edit
Bug 41795: Include the completeness attribute when matching on authtype

UNIMARC instances include the following two authority types
by default (among others): Corporate Body Name (code: 'CO')
and Collective Title (code: 'CO_UNI_TI').

The problem is that when searching for Corporate Body Name
authorities (in the OPAC or in the Staff interface), the
results will include Collective Title authorities as well.
It has to do with Corporate Body Name authorities using
an authtypecode (CO) that happens to be the prefix of the
authtypecode (CO_UNI_TI) used by Collective Titles.

NOTE: Elasticsearch is not affected by this.

The fix is to additionally pass the completeness attribute
to the RPN query sent to Zebra so that it will try to match
on what is literally found in the entire field's phrase
index (i.e. the value of UNIMARC 152$b), instead of performing
a partial match.

More information can be found at the official documentation:
https://software.indexdata.com/zebra/doc/querymodel-rpn.html#querymodel-bib1-completeness

Test plan (tailored for KTD):

0) Launch a UNIMARC Koha instance using Zebra:

   ktd --marcflavour unimarc --search-engine zebra up

1) Import the Sample MARC record attached to this Bug,
   containing a single Collective Title authority
   (adding one manually would take a long time due to
   the many mandatory subfields).

2) Perform a generic authority search (without entering
   anything in the search box) for all 'Corporate Body
   Name' authorities. Note the number of results returned
   (83), and also notice that in page 4 of the results you
   get a stray 'Collective Title' authority ("Selected
   works", the one you imported in Step 1).

3) Apply this patch (and `restart_all`).

4) Repeat the same search as in Step 2. This time, the
   number of results returned should be one less than
   before (82), and you should only see 'Corporate Body
   Name' authorities in the results.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to