Bugzilla – Attachment 172063 Details for
Bug 36433
Plugin hook elasticsearch_to_document
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36433: Plugin hook elasticsearch_to_document
Bug-36433-Plugin-hook-elasticsearchtodocument.patch (text/plain), 1.58 KB, created by
Shi Yao Wang
on 2024-09-26 20:05:39 UTC
(
hide
)
Description:
Bug 36433: Plugin hook elasticsearch_to_document
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2024-09-26 20:05:39 UTC
Size:
1.58 KB
patch
obsolete
>From 1680b8def3f73cb9a7217f076611cc4a6ec46b67 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Tue, 26 Mar 2024 22:17:16 +0100 >Subject: [PATCH] Bug 36433: Plugin hook elasticsearch_to_document > >Add a new hook elasticsearch_to_document in order to allow completing >the 'document' to be sent to Elasticsearch. Usage example: (1) add new >search fields, (2) normalize/sanitize existing fields, (3) use id fields >to retrieve info via web services in other repositories (say VIAF), (4) >download file referenced in a field, and index its content. > >To test: > >1. Apply the unit tests patch, and run it: > > prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t > > => FAIL: Tests fail! The hook is not implemented so the desired > >2. Apply this patch, and then repeat 1: > > => SUCCESS: It works! > >Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com> >--- > Koha/SearchEngine/Elasticsearch.pm | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index 5ef5235720..aab53dfdad 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -848,6 +848,15 @@ sub marc_records_to_documents { > } > } > >+ Koha::Plugins->call( >+ 'elasticsearch_to_document', >+ { >+ index => $self->index, >+ record => $record, >+ document => $record_document, >+ } >+ ); >+ > push @record_documents, $record_document; > } > return \@record_documents; >-- >2.34.1
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 36433
:
163943
|
163944
|
163962
|
163963
|
172062
|
172063
|
176749
|
176750
|
178685
|
178778