]> git.koha-community.org Git - koha.git/commit
Bug 33594: Only sort on title main heading
authorNick Clemens <nick@bywatersolutions.com>
Fri, 5 May 2023 12:51:19 +0000 (12:51 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 18 May 2023 14:03:28 +0000 (11:03 -0300)
commitaf505c9117812d2ad4b078b613c666d1f2c9fbaf
tree7771db020cfd985860e187b0884b906dd75ffa7a
parent7f1f0bc5b725f25e133e54478a23d269ebe6ff1a
Bug 33594: Only sort on title main heading

This patch simply remvoes sort from all elements that are not strictly
the main title

Note:
If multiple fields are set as sort, they are collapsed into a single entry in
the {field}__sort field in the ES index. The order will be determined by the order in
the marc record

To test:
1 - Apply patch
2 - perl misc/search_tools/rebuild_elasticsearch -r -v
3 - Search the catalog
4 - Sort by title
5 - Confirm records are correct
6 - Add a 240 (before the 245) with subfield a 'AAAAA'
7 - Confirm sorting is not affected
8 - View record details, click 'Elasticsearch record: Show'
9 - Find 'title__sort' and confirm it looks correct (does not include AAAAA)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
admin/searchengine/elasticsearch/mappings.yaml