Bug 27848 - Elasticsearch - include 245b subtitle and 245p part subfields in the default title index mappings
Summary: Elasticsearch - include 245b subtitle and 245p part subfields in the default ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Caroline Cyr La Rose
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-03 11:46 UTC by Lucy Vaux-Harvey
Modified: 2022-06-06 20:25 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds the 245$b (subtitle) and 245$p (part name) subfields to the default title index mappings for Elasticsearch.
Version(s) released in:
21.11.00


Attachments
Bug 27848: Elasticsearch - include 245b subtitle subfield in the default title index mappings (865 bytes, patch)
2021-05-12 20:41 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 27848: Elasticsearch - include 245p to default title index mappings (845 bytes, patch)
2021-05-12 20:41 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 27848: Elasticsearch - include 245b subtitle subfield in the default title index mappings (913 bytes, patch)
2021-05-18 21:56 UTC, David Nind
Details | Diff | Splinter Review
Bug 27848: Elasticsearch - include 245p to default title index mappings (893 bytes, patch)
2021-05-18 21:56 UTC, David Nind
Details | Diff | Splinter Review
Bug 27848: Elasticsearch - include 245b subtitle subfield in the default title index mappings (981 bytes, patch)
2021-05-26 11:11 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27848: Elasticsearch - include 245p to default title index mappings (961 bytes, patch)
2021-05-26 11:11 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27848: Elasticsearch - include 245b subtitle subfield in the default title index mappings (1.01 KB, patch)
2021-07-24 23:57 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27848: Elasticsearch - include 245p to default title index mappings (1019 bytes, patch)
2021-07-24 23:57 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucy Vaux-Harvey 2021-03-03 11:46:36 UTC
Currently the Elasticsearch default mappings do not include 245b so searches including subtitles will not return results.  It would be useful to have this added as a default mapping as it is a widely used subfield.
Comment 1 Caroline Cyr La Rose 2021-05-12 20:41:00 UTC
Created attachment 120906 [details] [review]
Bug 27848: Elasticsearch - include 245b subtitle subfield in the default title index mappings

This patchset adds 245$b (subtitle) and 245$p (part name) to the default title index mappings.

To test:
1) Apply patch
2) Reindex using rebuildelasticsearch.pl
3) Search for a subtitle or part name using the title index
Comment 2 Caroline Cyr La Rose 2021-05-12 20:41:14 UTC
Created attachment 120907 [details] [review]
Bug 27848: Elasticsearch - include 245p to default title index mappings
Comment 3 Caroline Cyr La Rose 2021-05-12 20:44:06 UTC
This is a comment I've had from clients too. 

I submitted a patch adding 245$b and a second patch adding 245$p which is the part name in a multipart series (for example in "Kitty cat 2, The return"; "The return" would be in 245$p).

This was my first time submitting several patches at once, I hope I did it correctly.

Caroline
Comment 4 Lucy Vaux-Harvey 2021-05-17 09:59:06 UTC
Hi Caroline, thanks for creating a patch for this and adding 245p as well :)

I've tested on a sandbox and searching works well but I couldn't see 245b and 245p listed in the Bibliographic records tab of the Elasticsearch configuration.  I think they should be listed here for completeness.
Comment 5 Caroline Cyr La Rose 2021-05-18 19:46:36 UTC
Hi Lucy,

You can see them if you click on "Reset mappings" in the mapping administration page.

I think they don't appear right away because the sandbox is created with the current file, THEN the patch is applied, which changes the file. So we have to "refresh" the mappings.


To test:
1) Apply patch
2) Reindex using rebuildelasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration and click "Reset mappings" and confirm
2b) Then reindex 

3) Search for a subtitle or part name using the title index
Comment 6 David Nind 2021-05-18 21:56:17 UTC
Created attachment 121137 [details] [review]
Bug 27848: Elasticsearch - include 245b subtitle subfield in the default title index mappings

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2021-05-18 21:56:21 UTC
Created attachment 121138 [details] [review]
Bug 27848: Elasticsearch - include 245p to default title index mappings

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 PTFS Europe Sandboxes 2021-05-26 11:11:53 UTC
Created attachment 121422 [details] [review]
Bug 27848: Elasticsearch - include 245b subtitle subfield in the default title index mappings

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Lucy Vaux-Harvey <lucy.vaux-harvey@ptfs-europe.com>
Comment 9 PTFS Europe Sandboxes 2021-05-26 11:11:57 UTC
Created attachment 121423 [details] [review]
Bug 27848: Elasticsearch - include 245p to default title index mappings

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Lucy Vaux-Harvey <lucy.vaux-harvey@ptfs-europe.com>
Comment 10 Lucy Vaux-Harvey 2021-05-26 11:13:11 UTC
Tnanks for the help Caroline, signed off now.
Comment 11 Katrin Fischer 2021-07-24 23:57:16 UTC
Created attachment 123170 [details] [review]
Bug 27848: Elasticsearch - include 245b subtitle subfield in the default title index mappings

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Lucy Vaux-Harvey <lucy.vaux-harvey@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2021-07-24 23:57:20 UTC
Created attachment 123171 [details] [review]
Bug 27848: Elasticsearch - include 245p to default title index mappings

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Lucy Vaux-Harvey <lucy.vaux-harvey@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Jonathan Druart 2021-08-04 12:05:51 UTC
Pushed to master for 21.11, thanks to everybody involved!