]> git.koha-community.org Git - koha.git/commit
Bug 19563: (follow-up) Restore checking sort variable
authorNick Clemens <nick@bywatersolutions.com>
Fri, 17 Nov 2017 12:13:55 +0000 (12:13 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 15 Dec 2017 11:28:12 +0000 (11:28 +0000)
commit9418010d63d04090fc1e317096e16e264eb593c6
treeb97a237239d3e484eb799d4eb476b645fcbee454
parent3b2669c90d4bdaa9f98eb442ec5e78eb08bd9957
Bug 19563: (follow-up) Restore checking sort variable

This code seems a bit odd, $self->sort_fields()->{$name} is checking if
there is any mapping in ES for a field, so if one marc field in an index
is marked as sortable this will exists. We need to check the individual
marc field to see if it should be added to the sort index here.

If you apply the first patch, reindex, and view a record in es:
curl -XGET 'localhost:9200/koha_kohadev_biblios/data/19/?pretty' | grep
-A 10 author__sort

You will see that 245$c is included in the record without that
additional check

Apply this, reindex again, and that field should not be included

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