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
Signed-off-by: Danielle M Elder <danielle.elder@law.utexas.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
f5347f4958
commit
f54556041b
|
|
@ -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: ~
|
||||
|
|
|
|||
Loading…
Reference in New Issue