Bug 37099

Summary: Add uniform title fields to the title and subject Elasticsearch index mappings
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: Searching - ElasticsearchAssignee: Wainui Witika-Park <wainuiwitikapark>
Status: Pushed to main --- QA Contact: Nick Clemens (kidclamp) <nick>
Severity: enhancement    
Priority: P5 - low CC: david, nick, wainuiwitikapark
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36852
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds the 630$a field to the 'subject (Topics)' search field index for new installations using Elasticsearch. Note: Existing installations will need to either manually add the mapping, or reset their mappings.
Version(s) released in:
26.05.00
Circulation function:
Attachments: Bug 37099: Add uniform title fields to the title and subject Elasticsearch index mappings
Bug 37099: Add uniform title fields to the subject Elasticsearch index mappings
Bug 37099: Add uniform title fields to the subject Elasticsearch index mappings
Bug 37099: Add uniform title fields to the subject Elasticsearch index mappings
Bug 37099: (QA follow-up) Combine fields in mappings for brevity

Description Aleisha Amohia 2024-06-17 01:55:29 UTC
We would like:

A 'title' or 'title as phrase' search to also search on the following Uniform Title fields:
* 130$a
* 240$a
* 730$a

A 'subject' or 'subject as phrase' search to also search on the following Uniform Title fields:
* 630$a
Comment 1 Wainui Witika-Park 2024-06-17 03:29:35 UTC
Created attachment 167782 [details] [review]
Bug 37099: Add uniform title fields to the title and subject Elasticsearch index mappings

Add 'title' or 'title as phrase' search to also search on the following
Uniform Title fields: 130$a, 240$a, 730$a

Add 'subject' or 'subject as phrase' search to also search on the following Uniform Title fields: 630$a

Sponsored-by: Educational Services Australia SCIS
Comment 2 Wainui Witika-Park 2024-07-15 01:20:32 UTC
Created attachment 168952 [details] [review]
Bug 37099: Add uniform title fields to the subject Elasticsearch index mappings

Add 'subject' or 'subject as phrase' search to also search on the following Uniform Title fields: 630$a

Sponsored-by: Educational Services Australia SCIS
Comment 3 David Nind 2024-07-15 04:28:15 UTC
Hi.

Isn't this already done for 630$a in bug 36852? (status = signed off)

David
Comment 4 David Nind 2025-07-05 22:59:08 UTC
Created attachment 183808 [details] [review]
Bug 37099: Add uniform title fields to the subject Elasticsearch index mappings

Add 'subject' or 'subject as phrase' search to also search on the following Uniform Title fields: 630$a

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-07-05 23:01:45 UTC
(In reply to David Nind from comment #3)
> Hi.
> 
> Isn't this already done for 630$a in bug 36852? (status = signed off)
> 
> David

That status for that bug is now "In discussion".

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 the 630a field is not mapped to the 'subject (Topics)' search field.

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

5. Repeat step 3 and note that the 630a field is now mapped to the 'subject (Topics)' search field.
Comment 6 Nick Clemens (kidclamp) 2026-01-15 16:29:59 UTC
Created attachment 191517 [details] [review]
Bug 37099: Add uniform title fields to the subject Elasticsearch index mappings

Add 'subject' or 'subject as phrase' search to also search on the following Uniform Title fields: 630$a

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Nick Clemens (kidclamp) 2026-01-15 16:30:02 UTC
Created attachment 191518 [details] [review]
Bug 37099: (QA follow-up) Combine fields in mappings for brevity

The syntax '630anr' is equivalent to mapping each individual field, this just keeps the file smaller

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 8 Lucas Gass (lukeg) 2026-01-22 17:04:32 UTC
Nice work everyone!

Pushed to main for 26.05