]> 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)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 15 Dec 2017 11:27:44 +0000 (11:27 +0000)
commit6dca540053020860f62d86a9e02d2ad0d45af0df
treea48ec7e46ce99a132505bbcf81af086b4ddc1cf5
parentdc06795ff74f7cb5e9fd9b992b72b7487b2ce7de
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch.pm