Bug 39194

Summary: Add a cronjob to report record IDs that have failed to be indexed (Elasticsearch - ES)
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: Searching - ElasticsearchAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Aleisha Amohia 2025-02-24 22:46:37 UTC
If a record is catalogued but does not successfully get indexed by Elasticsearch, it is called 'missing'. A summary of this can be seen on the Koha About page, under the System information tab. A user may see something like this:

Records are not indexed in Elasticsearch 
Warning 	27 record(s) missing on a total of 1807413 in index koha_kohadev_biblios. 

However we can't see from this view which record(s) are missing from the indices. It would be great to have a list of the IDs that are in the Koha database, but not in the ES indices.

Probably need this to be a cronjob as with large catalogues, a request like that would crash Koha. So would also want to report the time the script was run last to the page as well.
Comment 1 Aleisha Amohia 2025-03-10 02:06:21 UTC
Forgot about the /misc/maintenance/compare_es_to_db.pl script, which does this already!