Bugzilla – Attachment 155149 Details for
Bug 27153
ElasticSearch should search keywords apostrophe blind
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27153: Adjust mappings to add title without punctuation
Bug-27153-Adjust-mappings-to-add-title-without-pun.patch (text/plain), 2.01 KB, created by
Nick Clemens (kidclamp)
on 2023-09-01 17:57:23 UTC
(
hide
)
Description:
Bug 27153: Adjust mappings to add title without punctuation
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-09-01 17:57:23 UTC
Size:
2.01 KB
patch
obsolete
>From 2cc6ff82da3b5dbf0f4ea0ffd855e3c37b61a246 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 1 Sep 2023 17:32:35 +0000 >Subject: [PATCH] Bug 27153: Adjust mappings to add title without punctuation > >This patch finally adjust the default mappings to add a new field to >the elastic index with the title stripped of punctuation > >This method optionally allows the library to place the filtered version in the same >search field, or a new search field. The default mappings will include the filtered version >in a keyword search, but not a targeted search > >To test: >1 - Import some affected records via z3950, e.g.: > Carrie's war > 1,000 Japanese words >2 - Search (using Elasticsearch) for the titles without including punctuation > Carries war > 1000 Japanese words >3 - No results >4 - Reload mappings and reindex > perl misc/search_tools/rebuild_elasticsearch.pl -v -r >5 - Search again >6 - Success! >7 - Search title specifically: > ti:Carries war >8 - No results >9 - Adjust mappings.yaml to add second mapping for 245 to title index: > - facet: '' > marc_field: 245abp > marc_type: marc21 > sort: 1 > suggestible: 1 > filter: punctuation >10 - Reload mappings and reindex >11 - Repeat 7 >12 - Success >--- > admin/searchengine/elasticsearch/mappings.yaml | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > >diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml >index e0830506b6..f9f9a042c5 100644 >--- a/admin/searchengine/elasticsearch/mappings.yaml >+++ b/admin/searchengine/elasticsearch/mappings.yaml >@@ -3986,6 +3986,19 @@ biblios: > opac: 1 > staff_client: 1 > type: string >+ title-no-punctuation: >+ label: title-no-punctuation >+ mandatory: ~ >+ mappings: >+ - facet: '' >+ marc_field: 245(abp) >+ marc_type: marc21 >+ sort: 1 >+ suggestible: 1 >+ filter: punctuation >+ opac: 1 >+ staff_client: 1 >+ type: string > title-abbreviated: > label: title-abbreviated > mandatory: ~ >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27153
:
114234
|
139969
|
155145
|
155146
|
155147
|
155148
|
155149
|
155230
|
155502
|
155508
|
155509
|
155510
|
155511
|
155512
|
155513
|
155514
|
155515
|
155516
|
155517
|
157732
|
157733
|
157734
|
157735
|
157736
|
157737