Bugzilla – Attachment 167249 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), 3.99 KB, created by
Janusz Kaczmarek
on 2024-05-29 19:56:08 UTC
(
hide
)
Description:
Bug 36991: Add ability to scan call numbers index/search field
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2024-05-29 19:56:08 UTC
Size:
3.99 KB
patch
obsolete
>From b10b1653e6b36ed5534a5cd1163534e2fbc0bab6 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 > >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. >--- > 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 ac161e50fd..6b35f14f4a 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 929f2f9410..77d9152cf3 100644 >--- a/admin/searchengine/elasticsearch/mappings.yaml >+++ b/admin/searchengine/elasticsearch/mappings.yaml >@@ -2606,7 +2606,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 91db336895..6ad76edf67 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -417,6 +417,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.2
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