]> git.koha-community.org Git - koha.git/commit
Bug 17661: Ending punctuation causes duplicate facets
authorNick Clemens <nick@bywatersolutions.com>
Thu, 2 Nov 2017 16:52:53 +0000 (16:52 +0000)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 9 Sep 2020 10:04:11 +0000 (22:04 +1200)
commit4506ca63e39a682af6c57c9c844d36ec7dcef0f4
tree3a576ac19f46eedd356df34a87e9377a8ee01610
parentec714bc6cecc6c9fd3be2216288974d4f71591e2
Bug 17661: Ending punctuation causes duplicate facets

The current code for facets doesn't pull strip ending punctuation from facets
This causes duplicate facets for terms that should be combined

Sometimes series can have different punctuation depending on the field they are in
Author initials punctuation should be preserved

To test:
1 - Do search and pull up some records
2 - Edit some of the records to have authors like:
    Date, C.J.
    Date, C.j.
    Date, C.J .
3 - Edit the records to have some series statments like:
    830 $aDate, C.J. ;$v5
    830 $aDate, C.J. ; $v5
    830 $aDate, C.J.; $v5
4 - Add some 490s to the record with first indicator 1 and series like:
    You wouldn't want to--
    You wouldn't want to
    You wouldn't want to..
5 - Search again and note you have 3 facets each for author and series
6 - Apply patch
7 - Repeat
8 - Now you get 2 facets for author, period not removed when following Upper case immediately, is otherwise
9 - Now you should have a single series facet
10 - Switch search engine to ES (index before applying patch)
11 - Note facets are separate again
12 - Reset mappings and reindex
   perl misc/search_tools/rebuild_elasticsearch -v -r
13 - Repeat search, facets combined as above

Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e34f95a1f5eb0fce238ab442553bec5233263a9c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0bfeb9990181445a14e4858b3d61954c1daf30ce)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
C4/Search.pm
admin/searchengine/elasticsearch/field_config.yaml
admin/searchengine/elasticsearch/index_config.yaml