Summary: | Add options to compare_es_to_db script | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Searching - Elasticsearch | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | Pushed to main --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | martin.renvoize, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Initiative type: | --- | |
Sponsorship status: | --- | Crowdfunding goal: | 0 |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
The `compare_es_to_db.pl` script now supports the `-b/--biblios` and `-a/--authorities` options, allowing checks to be limited to a single index.
Additionally, the generated Elasticsearch curl link has been updated to align with the latest version structure.
|
|
Version(s) released in: |
25.11.00
|
Circulation function: | |
Attachments: |
Bug 39636: Update curl link
Bug 39636: Add option to specify which indexes to check Bug 39636: Update curl link Bug 39636: Add option to specify which indexes to check Bug 39636: Update curl link Bug 39636: Add option to specify which indexes to check Bug 39636: Update curl link |
Description
Nick Clemens (kidclamp)
2025-04-15 11:47:03 UTC
(In reply to Nick Clemens (kidclamp) from comment #0) > Additionally, getting links to the staff side can be useful when library > staff need to edit/update bad records Oops - this was already done Created attachment 180957 [details] [review] Bug 39636: Update curl link With the move to the latest ES versions we got rid of 'data' type - we need to use '_doc' To test: 1 - Delete a record from the DB directly DELETE FROM biblio WHERE biblionumber=45; 2 - perl misc/maintenance/compare_es_to_db.pl 3 - Try the curl command - it doesn't work 4 - Apply this patch 5 - perl misc/maintenance/compare_es_to_db.pl 6 - Try the curl command - it now fetches the record Created attachment 180958 [details] [review] Bug 39636: Add option to specify which indexes to check This patch adds --biblios and --authorities options to the script to allow checking only a single index To test: 0 - Apply patch 1 - perl misc/maintenance/compare_es_to_db.pl 2 - biblios and authorities are checked 3 - perl misc/maintenance/compare_es_to_db.pl -b 4 - Only biblios are checked 5 - perl misc/maintenance/compare_es_to_db.pl -a 6 - Only authorities are checked 7 - perl misc/maintenance/compare_es_to_db.pl -a -b 8 - Both indexes are checked Created attachment 180959 [details] [review] Bug 39636: Update curl link With the move to the latest ES versions we got rid of 'data' type - we need to use '_doc' To test: 1 - Delete a record from the DB directly DELETE FROM biblio WHERE biblionumber=45; 2 - perl misc/maintenance/compare_es_to_db.pl 3 - Try the curl command - it doesn't work 4 - Apply this patch 5 - perl misc/maintenance/compare_es_to_db.pl 6 - Try the curl command - it now fetches the record Created attachment 180972 [details] [review] Bug 39636: Add option to specify which indexes to check This patch adds --biblios and --authorities options to the script to allow checking only a single index To test: 0 - Apply patch 1 - perl misc/maintenance/compare_es_to_db.pl 2 - biblios and authorities are checked 3 - perl misc/maintenance/compare_es_to_db.pl -b 4 - Only biblios are checked 5 - perl misc/maintenance/compare_es_to_db.pl -a 6 - Only authorities are checked 7 - perl misc/maintenance/compare_es_to_db.pl -a -b 8 - Both indexes are checked Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: tidied Created attachment 180973 [details] [review] Bug 39636: Update curl link With the move to the latest ES versions we got rid of 'data' type - we need to use '_doc' To test: 1 - Delete a record from the DB directly DELETE FROM biblio WHERE biblionumber=45; 2 - perl misc/maintenance/compare_es_to_db.pl 3 - Try the curl command - it doesn't work 4 - Apply this patch 5 - perl misc/maintenance/compare_es_to_db.pl 6 - Try the curl command - it now fetches the record Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Nice, thank you! QA script happy and works as expected. Please backport this helpful maintenance enhancement. Created attachment 187046 [details] [review] Bug 39636: Add option to specify which indexes to check This patch adds --biblios and --authorities options to the script to allow checking only a single index To test: 0 - Apply patch 1 - perl misc/maintenance/compare_es_to_db.pl 2 - biblios and authorities are checked 3 - perl misc/maintenance/compare_es_to_db.pl -b 4 - Only biblios are checked 5 - perl misc/maintenance/compare_es_to_db.pl -a 6 - Only authorities are checked 7 - perl misc/maintenance/compare_es_to_db.pl -a -b 8 - Both indexes are checked Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Created attachment 187047 [details] [review] Bug 39636: Update curl link With the move to the latest ES versions we got rid of 'data' type - we need to use '_doc' To test: 1 - Delete a record from the DB directly DELETE FROM biblio WHERE biblionumber=45; 2 - perl misc/maintenance/compare_es_to_db.pl 3 - Try the curl command - it doesn't work 4 - Apply this patch 5 - perl misc/maintenance/compare_es_to_db.pl 6 - Try the curl command - it now fetches the record Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Nice work everyone! Pushed to main for 25.11 |