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

            Bug ID: 43498
           Summary: UNIMARC: authority search returns no results when the
                    authority type is only in 942$a
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Searching - Zebra
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
        Depends on: 41795
  Target Milestone: ---

Bug 41795 added the completeness attribute (@attr 6=3) to the authtype clause
in C4::AuthoritiesMarc::SearchAuthorities. Complete-field matching resolves
against Zebra's phrase ('p') register.

The UNIMARC authority index definitions build the authtype index from two
places:
- 152$b -> authtype:w authtype:p
- 942$a -> authtype:w (word register only)

On UNIMARC installations whose authority records carry the authority type in
942$a only (no 152 coded data field -- common in real-world UNIMARC sites), the
authtype phrase register is empty, so every type-filtered authority search
returns zero results. In particular, the authority finder launched from the
bibliographic editor (e.g. on field 600) always passes an authtypecode, so
cataloguers cannot search or link authorities at all.

We hit this on three independent production UNIMARC installations (different
servers, different Koha and Zebra builds) immediately after upgrading to
releases containing Bug 41795 (26.05.00 / 25.11.05). On all of them nearly all
authority records have the type in 942$a and no 152$b.

Reproduced on current main with KTD (unimarc flavour, Zebra 2.2.8):

1) Create an authority whose type is in 942$a only; full authorities reindex.
2) Authority search with a type filter -> 0 results; the same search without a
type filter finds the record.
3) yaz-client against the authority socket confirms the mechanism:
   @attr 1=authtype @attr 5=100 @attr 6=3 <value> -> 0 hits
   @attr 1=authtype @attr 5=100 <value> -> 1 hit

The Bug 41795 follow-up ("add a phrase Zebra index for 'authtype'") fixed
exactly this for MARC21 after the Jenkins failures, but the UNIMARC definitions
were not updated (their 152$b block already had a :p index, which masked the
942$a case).

The patch (to be attached) applies the same one-line change to the UNIMARC
definitions: add authtype:p to the 942$a block in authority-koha-indexdefs.xml,
with the regenerated authority-zebra-indexdefs.xsl. A full authorities reindex
is required after applying -- worth flagging prominently if this gets
backported (cf. Bug 41795 comment 19).

Elasticsearch is not affected.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41795
[Bug 41795] UNIMARC: a Zebra search for Corporate Body Name authorities will
also return Collective Titles
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to