From 965271fe38ba02893bb238cfc998dd6e38f03406 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 5 May 2023 12:51:19 +0000 Subject: [PATCH] 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 --- .../searchengine/elasticsearch/mappings.yaml | 150 +++++++++--------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml index 87190c30bb..e0830506b6 100644 --- a/admin/searchengine/elasticsearch/mappings.yaml +++ b/admin/searchengine/elasticsearch/mappings.yaml @@ -3601,37 +3601,37 @@ biblios: - facet: '' marc_field: '130' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '210' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '211' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '212' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '214' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '222' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '240' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 245abp @@ -3641,57 +3641,57 @@ biblios: - facet: '' marc_field: '246' marc_type: marc21 - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: '247' marc_type: marc21 - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 490a marc_type: marc21 - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 505t marc_type: marc21 - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 700t marc_type: marc21 - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 710t marc_type: marc21 - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 711t marc_type: marc21 - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: '730' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '740' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '780' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: '785' marc_type: marc21 - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 200a @@ -3701,287 +3701,287 @@ biblios: - facet: '' marc_field: 200c marc_type: unimarc - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 200d marc_type: unimarc - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 200e marc_type: unimarc - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 200h marc_type: unimarc - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 200i marc_type: unimarc - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: '205' marc_type: unimarc - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 304a marc_type: unimarc - sort: 1 + sort: 0 suggestible: 1 - facet: '' marc_field: 327a marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 327b marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 327c marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 327d marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 327e marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 327f marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 327g marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 327h marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 327i marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 328t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 410t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 411t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 412t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 413t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 421t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 422t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 423t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 424t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 425t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 430t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 431t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 432t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 433t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 434t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 435t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 436t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 437t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 440t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 441t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 442t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 443t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 444t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 445t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 446t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 447t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 448t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 451t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 452t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 453t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 454t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 455t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 456t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 461t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 462t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 463t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 464t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 470t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 481t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 482t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' - facet: '' marc_field: 488t marc_type: unimarc - sort: 1 + sort: 0 suggestible: '' opac: 1 staff_client: 1 -- 2.30.2