]> git.koha-community.org Git - koha.git/commit
Bug 25873: Ignore malformed data for Elasticsearch integer fields
authorJulian Maurice <julian.maurice@biblibre.com>
Thu, 25 Jun 2020 07:25:41 +0000 (11:25 +0400)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Sun, 20 Sep 2020 11:11:19 +0000 (13:11 +0200)
commit664aa36698ae0ad9ae33f5a7a7a8e8fa7924f1ae
tree798c71c30cc3e6ca953ff28f0098416990a2caf4
parentbad82e2a3cb7d2def220bc787c1f2d58c08ec6e2
Bug 25873: Ignore malformed data for Elasticsearch integer fields

If we try to put malformed data into an integer field, Elasticsearch
rejects the whole document.
Setting 'ignore_malformed' to true allows to ignore malformed data and
process the other fields of the document normally

https://www.elastic.co/guide/en/elasticsearch/reference/7.8/ignore-malformed.html

Test plan:
* Without the patch
  1. In search engine configuration, change the type of a text field to
  'Number' (for instance 'title')
  2. misc/search_tools/rebuild_elasticsearch.pl -d -b
  3. See that the index is empty (unless you have titles consisting only
  of digits)
* With the patch
  1. misc/search_tools/rebuild_elasticsearch.pl -d -b
  2. Now records are correctly indexed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cb5acdc6702cef4668921ccf2537797358981fff)

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

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 9b9c56c3b28e4e5e1592b3a0102114d88418d958)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
admin/searchengine/elasticsearch/field_config.yaml