Bugzilla – Attachment 164224 Details for
Bug 36269
Elasticsearch: publisher-location (pl) index should include 260a/264a (MARC21)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36269: ElasticSearch: publisher-location (pl) should use260a/264a
Bug-36269-ElasticSearch-publisher-location-pl-shou.patch (text/plain), 3.27 KB, created by
Nick Clemens (kidclamp)
on 2024-04-01 17:56:38 UTC
(
hide
)
Description:
Bug 36269: ElasticSearch: publisher-location (pl) should use260a/264a
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-04-01 17:56:38 UTC
Size:
3.27 KB
patch
obsolete
>From 8db2379d05857bc98e4fa092bbeacdf2f02ae255 Mon Sep 17 00:00:00 2001 >From: Thomas Klausner <domm@plix.at> >Date: Thu, 7 Mar 2024 17:56:13 +0100 >Subject: [PATCH] Bug 36269: ElasticSearch: publisher-location (pl) should > use260a/264a >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Currently the index `pl` points to 008/15-17. It should >(additionally/instead?) point to 260a and/or 264a. > >Test plan (for koha-testing-docker with ElasticSearch via `ktd --es7 up`) > >Verify the old/broken behaviour: > >* Go to Staff/Advanced Search >* Select "Publisher Location" and enter "cau", start search >* You will get some hits (~16), eg "Perl best practices / Damian Conway", which has 008 of "051222s2005 caua b 001 0 eng d" with "cau" on 15-17 >* Edit this record (cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=5) >* Inspect 260$a, which should containt "Sebastopol, CA :" >* Go back to Advanced Search and search for "Publisher Location" = "Sebastopol" >* No hits! > >Apply the patch! > >* exit ktd and stop it (ktd --es7 down; ktd --es7 stop) >* start it again >* Go to Staff / Administration / Search Engine Config (Elasticsearch) >* Click on the Tab "Bibliographic records" and search/filter for "pl" >* you should see 3 entries for "pl", with Mapping values of "008_/15-17", "260a" and "264a" >* Go to Search, >* Select "Publisher Location" and enter "cau", start search >* same hits as befor >* Search again, but for "Sebastopol" >* Now you'll get 9 hits!! > >Bonus: Test 264a > >* Got to Admin / MARC bibl framework, select BKS -> MARC structure >* search for tag "264", edit subfields >* in tabs a, b, c: Check the "Editor" Checkbox (Visibility) >* Save changes >* find a book, eg again "Perl best practices" and edit it >* find field 264 and enter "Test" into 264a, Save >* Depending on your setup, you might have to manually re-index the book: > * enter ktd: ktd --shell > * reindex the one book (via --bn) or all (might also need a -d) > /usr/share/koha/bin/search_tools/rebuild_elasticsearch.pl -v -b -d >* Go again to Advanced Search, Publisher Location = "Test" >* You should find the book > >If your NOT running ktd, you might be able to just edit the ElasticSearch Mappings to add / change the mapping for "pl" to point to "260a". > >One rather harsh way to do this (which I needed to do, because the ES Mappings UI did not work for me) is via this SQL: >update search_marc_map set marc_field='260a' where marc_field='008_/15-17'; > >Sponsored-by: Steiermärkische Landesbibliothek >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > admin/searchengine/elasticsearch/mappings.yaml | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml >index f9f9a042c5b..9cd3db5c967 100644 >--- a/admin/searchengine/elasticsearch/mappings.yaml >+++ b/admin/searchengine/elasticsearch/mappings.yaml >@@ -3065,6 +3065,16 @@ biblios: > marc_type: marc21 > sort: 1 > suggestible: '' >+ - facet: '' >+ marc_field: '260a' >+ marc_type: marc21 >+ sort: 1 >+ suggestible: '' >+ - facet: '' >+ marc_field: '264a' >+ marc_type: marc21 >+ sort: 1 >+ suggestible: '' > opac: 1 > staff_client: 1 > type: '' >-- >2.30.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 36269
:
162913
|
162932
| 164224