[Koha-bugs] [Bug 34693] Add 035$a as Other-control-number index in authorities search indexes (MARC21, Elasticsearch)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 5 23:23:21 CET 2024


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

Lucas Gass <lucas at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #155152|0                           |1
        is obsolete|                            |

--- Comment #3 from Lucas Gass <lucas at bywatersolutions.com> ---
Created attachment 162795
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162795&action=edit
Bug 34693: Add 035$a as Other-control-number index in default authorities
search indexes

This patch adds a new index for authorities, Other-control-number, and maps it
to 035$a.

This will help when trying to match authority records when importing external
records.

Test 1:
0. Make sure Elasticsearch is set as the search engine
1. Apply patch and restart
2. Import the attached record
   2.1. Go to Cataloging > Stage records for import
   2.2. Choose the file
   2.3. Click Upload file
   2.4. Choose Record type: Authority
   2.5. Click Stage for import
   (wait until the job is finished...)
   2.6. Click View batch
   2.7. Click Import this batch into the catalog
   (wait until the job is finished...)
   2.8. Click Manage imported batch
   2.9. Click View next to the record
   2.10. Note the auth id number

3. Examine the ES entry for the record (replace INDEX_NAME with the index name
(found in koha-conf.xml and XX with the auth_id)

curl -XGET
'http://localhost:9200/INDEX_NAME_authorities/data/XX?_source_includes=other-control-number&pretty'

--> It should give you the value of 035$a

Test 2 (optional):
1. Steps 1 and 2 as above
2. Add a matching rule to match on 035$a for authority records
   2.1. Go to Administration > Record matching rules
   2.2. Click New record matching rule
   2.3. Fill out the form
        - Matching rule code: enter a code (for example AUTCONTROL)
        - Description: enter a description (for example 035$a for authorities)
        - Match threshold: 100
        - Record type: Authority record
        - Search index: Other-control-number
        - Score: 100
        - Tag: 035
        - Subfields: a
   2.4. Click Save
3. Import the same record again, checking for matches using the new rule
   3.1. Go to Cataloging > Stage records for import
   3.2. Choose the file
   3.3. Click Upload file
   3.4. Choose Record type: Authority
   3.5. Choose Record matching rule: rule created above
   2.6. Click Stage for import
   (wait until the job is finished...)
   --> It should say that 1 record was found using the rule

Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list