Bug 36433 - Plugin hook elasticsearch_to_document
Summary: Plugin hook elasticsearch_to_document
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Frédéric Demians
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-26 17:10 UTC by Frédéric Demians
Modified: 2025-01-17 18:41 UTC (History)
4 users (show)

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


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
Bug 36433: UT (3.44 KB, patch)
2024-09-26 20:05 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 36433: Plugin hook elasticsearch_to_document (1.58 KB, patch)
2024-09-26 20:05 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 36433: UT (3.52 KB, patch)
2025-01-17 18:41 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 36433: Plugin hook elasticsearch_to_document (1.66 KB, patch)
2025-01-17 18:41 UTC, Kyle M Hall (khall)
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!
Comment 6 Shi Yao Wang 2024-09-26 20:05:37 UTC
Created attachment 172062 [details] [review]
Bug 36433: UT

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Comment 7 Shi Yao Wang 2024-09-26 20:05:39 UTC
Created attachment 172063 [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!

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Comment 8 Kyle M Hall (khall) 2025-01-17 18:41:02 UTC
Created attachment 176749 [details] [review]
Bug 36433: UT

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall (khall) 2025-01-17 18:41:41 UTC
Created attachment 176750 [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!

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>