]> git.koha-community.org Git - koha.git/commit
Bug 25957: Don't push blank field values to ES document
authorNick Clemens <nick@bywatersolutions.com>
Mon, 28 Sep 2020 15:29:51 +0000 (15:29 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 20 Oct 2020 19:53:02 +0000 (19:53 +0000)
commit3d21e7b578f046c51a4d50775500058744be5530
tree85f0ebdac92f44c6610015689a46a6b937ba58d1
parenta36a205dd03c67cdd4c87e22ecf90c46fedcfb3b
Bug 25957: Don't push blank field values to ES document

To test:
 1 - Load the sample DB or edit a record (using advanced cataloging editor) to have a blank subfield in a field that is indexed as suggestible
 2 - For example 'author' / 100a
     100 _ _ ‡a
 3 - Index that record into Elasticsearch 5.X:
     perl misc/search_tools/rebuild_elasticsearch.pl  -v -bn 115 -b -d
 4 - Note error 'value must have length > 0'
 5 - Edit mappings to set author 100a not suggestible
 6 - perl misc/search_tools/rebuild_elasticsearch.pl  -v -bn 115 -b -d
 7 - Success
 8 - Set field to suggestible again
 9 - Apply patch
10 - perl misc/search_tools/rebuild_elasticsearch.pl  -v -bn 115 -b -d
11 - Success!

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit eb3d0982ae8f22fe5354fae93dc4ea13c4f07ce3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch.pm