Bug 36728

Summary: Add cancelled/valid standard number to Elasticsearch index mappings
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: Searching - ElasticsearchAssignee: Alex Buckley <alexbuckley>
Status: Failed QA --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: alexbuckley, david, nick
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 36728: Add cancelled/invalid standard number (024z) to ES index mappings
Bug 36728: Add cancelled/invalid standard number (024z) to ES index mappings

Description Aleisha Amohia 2024-04-30 05:25:09 UTC
Can currently search on the identifier-other with the 024$a mapping

It would be useful to have another index on the invalid-identifier-other mapping to the 024$z only https://www.loc.gov/marc/bibliographic/bd024.html
Comment 1 Aleisha Amohia 2024-05-14 01:28:28 UTC
This should be approached similarly to Bug 36574 and Bug 36727, and additionally add 024$az to the identifier-standard index
Comment 2 Alex Buckley 2024-05-15 01:03:08 UTC
Created attachment 166745 [details] [review]
Bug 36728: Add cancelled/invalid standard number (024z) to ES index mappings

- Added a new index invalid-identifier-other for 024z
- Added 024az to existing indentifier-standard index

Test plan:
1. Start up KTD with Elasticsearch: ktd --es8 up

2. Add a new biblio record putting the value '2471697678526' into the cancelled/valid standard number ( 024$z)

3. Do a biblio search for '2471697678526' and confirm no results are returned

4. Apply this patch and restart all services (restart_all)

5. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)

6. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev

7. Alternative to steps 5 and 6: reset_all

8. Repeat the biblio search for '2471697678526' and confirm you get a result

Sponsored-by: Education Services Australia SCIS
Comment 3 Alex Buckley 2024-05-30 00:56:13 UTC
This one is ready to test.
Comment 4 David Nind 2024-05-30 22:13:17 UTC
Created attachment 167295 [details] [review]
Bug 36728: Add cancelled/invalid standard number (024z) to ES index mappings

- Added a new index invalid-identifier-other for 024z
- Added 024az to existing indentifier-standard index

Test plan:
1. Start up KTD with Elasticsearch: ktd --es8 up

2. Add a new biblio record putting the value '2471697678526' into the cancelled/valid standard number ( 024$z)

3. Do a biblio search for '2471697678526' and confirm no results are returned

4. Apply this patch and restart all services (restart_all)

5. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)

6. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev

7. Alternative to steps 5 and 6: reset_all

8. Repeat the biblio search for '2471697678526' and confirm you get a result

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2024-05-30 22:15:30 UTC
Testing notes (using KTD):

1. Edit bibliographic framework used for record to edit, to make 024$z visible in the editor.
Comment 6 Nick Clemens (kidclamp) 2024-09-27 18:01:43 UTC
This one looks good, but I question adding subfields a and z to the identifier standard. We have seen with other fields like ISBN that libraries prefer not to see these fields searched by default.

I think adding the new index is a good idea but we should add only the 024a to the identifier-standard