Bug 36849

Summary: Add more tags to Elasticsearch mapping for title, title as phrase
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: Searching - ElasticsearchAssignee: Wainui Witika-Park <wainuiwitikapark>
Status: Signed Off --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: david, flyingendpaper, mathsabypro, wainuiwitikapark
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: Sponsored
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
This enhancement adds these fields to the 'title' index for new installations using Elasticsearch: 440$a, 600$t, 800$t, 810$t, 830$n$p. This makes records with information in these fields findable in the staff interface and OPAC, and in the advanced search, when using the 'Title' and 'Title as phrase' options. Note: Existing installations will need to either manually add these, or reset the mappings.
Version(s) released in:
Circulation function:
Attachments: Bug 36849: Add more tags to Elasticsearch mapping for title, title as phrase
Bug 36849: Add more tags to Elasticsearch mapping for title, title as phrase
Bug 36849: Add more tags to Elasticsearch mapping for title, title as phrase

Description Aleisha Amohia 2024-05-13 23:12:09 UTC
Libraries may expect a 'title' search to look at a few other tags that aren't currently mapped.

To the title index for MARC21, we would like to additionally map:

* 440a
* 600t
* 800t
* 810t
* 830np
Comment 1 Wainui Witika-Park 2024-05-28 05:01:17 UTC Comment hidden (obsolete)
Comment 2 Wainui Witika-Park 2024-05-29 05:30:39 UTC
Created attachment 167233 [details] [review]
Bug 36849: Add more tags to Elasticsearch mapping for title, title as phrase

Add additional mappings to the title index for MARC21: 440a, 600t, 800t, 810t, 830np

Sponsored-by: Educational Services Australia SCIS
Comment 3 David Nind 2025-07-05 03:17:05 UTC
Created attachment 183805 [details] [review]
Bug 36849: Add more tags to Elasticsearch mapping for title, title as phrase

Add additional mappings to the title index for MARC21: 440a, 600t, 800t, 810t, 830np

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-07-05 03:19:50 UTC
Testing notes (using KTD):

1. Start up KTD with Elasticsearch: ktd --es7 up

2. Go to Koha administration > Catalog > Search engine configuration (Elasticsearch).

3. In the bibliographic records tab, search the page and note that none of the 440a, 600t, 800t, 810t, 830np fields are mapped to the title search field. Current mappings:
- 440a - title-series (Series)
- 600t - subject (Topics)
- 800t - author-title, title-series (Series)
- 810t - author-title, title-series (Series)
- 830np - not mapped to any search fields

4. Apply the patch and reset everything (reset_all) (alternative: reset the mappings, reindex everything (koha-elasticsearch --rebuild -d -b -a kohadev), then restart everything).

5. Repeat step 3 and note that the 440a, 600t, 800t, 810t, 830np fields are now mapped to the 'title' search field, in addition to the existing mappings in step 3.