From bb4315332920bcb29deed56b66a81dba9f2e2b04 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 23 Mar 2023 08:02:42 +0000 Subject: [PATCH] Bug 29185: Facilitate searching for cnum Instead of typing the case sensitive Control-number each time. 4 strikes instead of 15 on your keyboard. Wow! Gain of 73%. Test plan: Copy ccl.properties to /etc/koha/zebradb, restart Zebra and search for cnum=SOME_ID in opac or intranet. Signed-off-by: Marcel de Rooy Signed-off-by: David Nind --- C4/Search.pm | 1 + Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 1 + etc/zebradb/ccl.properties | 1 + 3 files changed, 3 insertions(+) diff --git a/C4/Search.pm b/C4/Search.pm index 5985db2edb..ea54de1158 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1009,6 +1009,7 @@ sub getIndexes{ 'Conference-name-seealso', 'Content-type', 'Control-number', + 'cnum', 'Control-number-identifier', 'cni', 'copydate', diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index d5dbdee886..26d52051cf 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -82,6 +82,7 @@ our %index_field_convert = ( 'notes' => 'note', 'rcn' => 'record-control-number', 'cni' => 'control-number-identifier', + 'cnum' => 'control-number', 'su' => 'subject', 'su-to' => 'subject', #'su-geo' => 'subject', diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index b71036e872..985f7391bc 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -986,6 +986,7 @@ ext 4=1 6=3 ### # Koha Local-Use Biblio Indexes Control-number 1=9001 +cnum Control-number biblionumber 1=9002 totalissues 1=9003 cn-bib-source 1=9004 -- 2.30.2