Bugzilla – Attachment 173863 Details for
Bug 36991
Add ability to scan call numbers index/search field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36991: Add ability to scan call numbers index/search field
Bug-36991-Add-ability-to-scan-call-numbers-indexse.patch (text/plain), 4.13 KB, created by
Marcel de Rooy
on 2024-11-01 10:54:28 UTC
(
hide
)
Description:
Bug 36991: Add ability to scan call numbers index/search field
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-11-01 10:54:28 UTC
Size:
4.13 KB
patch
obsolete
>From 623a81eb24322aeb947df1f8a154c645105c39c3 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 29 May 2024 19:40:45 +0000 >Subject: [PATCH] Bug 36991: Add ability to scan call numbers index/search > field >Content-Type: text/plain; charset=utf-8 > >Some libraries ask for the ability to scan/browse the call numbers index. > >Test plan: >========== >1. Have an installation with items with callnumbers (in ktd with standard > test data set: add some callnumbers to the items). >2. Go to Advanced search > More options; choose Call number in the first > drop list and mark Scan indexes. Enter one of the call numbers you > assigned to the items and perform the search. You should get no > results. >3. Apply the pach; restart all; when using ES: > koha-elasticsearch --rebuild -r -d kohadev >4. Repeat p. 2. You should get a list with at least one call number. > The link should lead you to the record(s) with items with the selected > call number. > >This should work for ES and for Zebra, but for Zebra you would need to >replace /etc/koha/zebradb/ccl.properties with the repository version; and >you will get one token results on the list, like for other indexes. > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 11 ++++++----- > admin/searchengine/elasticsearch/mappings.yaml | 2 +- > etc/zebradb/ccl.properties | 2 +- > .../prog/en/modules/catalogue/results.tt | 2 ++ > 4 files changed, 10 insertions(+), 7 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index c5596f2e99..f36264e423 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -635,11 +635,12 @@ the provided string input. > =cut > > our %scan_field_convert = ( >- 'ti' => 'title', >- 'au' => 'author', >- 'su' => 'subject', >- 'se' => 'title-series', >- 'pb' => 'publisher', >+ 'ti' => 'title', >+ 'au' => 'author', >+ 'su' => 'subject', >+ 'se' => 'title-series', >+ 'pb' => 'publisher', >+ 'callnum' => 'local-classification', > ); > > sub _build_scan_query { >diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml >index f1bfdbe916..d3c8798b6f 100644 >--- a/admin/searchengine/elasticsearch/mappings.yaml >+++ b/admin/searchengine/elasticsearch/mappings.yaml >@@ -2657,7 +2657,7 @@ biblios: > label: local-classification > mandatory: ~ > mappings: >- - facet: '' >+ - facet: 1 > marc_field: 952o > marc_type: marc21 > sort: 0 >diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties >index 985f7391bc..a71ea8f4c4 100644 >--- a/etc/zebradb/ccl.properties >+++ b/etc/zebradb/ccl.properties >@@ -1039,7 +1039,7 @@ stack 1=8018 > issues 1=8019 > renewals 1=8020 > reserves 1=8021 >-Local-classification 1=8022 >+#Local-classification 1=8022 > barcode 1=8023 > bc barcode > onloan 1=8024 14=1 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index e4f6638743..4c8deeb929 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -418,6 +418,8 @@ > [% ELSE %]<option value="sn">ISBN</option>[% END %] > [% IF ( header_pulldown == "ms_ss" ) %]<option selected="selected" value="ss">ISSN</option> > [% ELSE %]<option value="ss">ISSN</option>[% END %] >+ [% IF ( header_pulldown == "ms_callnum" ) %]<option selected="selected" value="callnum">Call number</option> >+ [% ELSE %]<option value="callnum">Call number</option>[% END %] > </select> > [% IF ( scan_search_term_to_use ) %] > <input type="text" name="q" id="scan-index-term" size="35" value="[% scan_search_term_to_use | html %]" /> >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36991
:
167249
|
167266
| 173863