Bug 36433 - Plugin hook elasticsearch_to_document
Summary: Plugin hook elasticsearch_to_document
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Frédéric Demians
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-26 17:10 UTC by Frédéric Demians
Modified: 2024-03-26 22:27 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 36433: UT (3.27 KB, patch)
2024-03-26 17:24 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 36433: Plugin hook elasticsearch_to_document (1.47 KB, patch)
2024-03-26 17:24 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 36433: UT (3.39 KB, patch)
2024-03-26 21:22 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 36433: Plugin hook elasticsearch_to_document (1.53 KB, patch)
2024-03-26 21:22 UTC, Frédéric Demians
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Demians 2024-03-26 17:10:14 UTC
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.
Comment 1 Frédéric Demians 2024-03-26 17:11:50 UTC
Close to bug 31897
Comment 4 Frédéric Demians 2024-03-26 21:22:09 UTC
Created attachment 163962 [details] [review]
Bug 36433: UT
Comment 5 Frédéric Demians 2024-03-26 21:22:11 UTC
Created attachment 163963 [details] [review]
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!