]> git.koha-community.org Git - koha.git/commit
Bug 19563: Generation of sort_fields uses incorrect condition
authorDavid Gustafsson <david.gustafsson@ub.gu.se>
Thu, 2 Nov 2017 12:44:13 +0000 (13:44 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Dec 2017 16:59:13 +0000 (13:59 -0300)
commit963eaeab7bda800ca8bbc123d94a7b4ccaa9de0c
tree8bef4b1eef69d64a61ed9e812becb84df700d627
parent34cdd536cb16436b407947eecd6975b8d4f44467
Bug 19563: Generation of sort_fields uses incorrect condition

Fix incorrect condition for if clause for generating <field>__sort mappings
for Elasticsearch. Also remove redundant check for same condition when
generating fixer rules.

Test plan:
1. Inspect current mappings for example by viewing: http://<elasticsearch_host>:9200/koha_<koha_instance_name>_biblios/_mapping.
2. If using the default configuraion only "author" has a sort field (author__sort).
4. Appy patch.
5. Reindex using rebuild_elastic_search.pl.
6. All fields except those with sort sort set to "0" should now have sort fields, which in the default configuration is all but "author".

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/SearchEngine/Elasticsearch.pm