Summary: | Reindex only Biblios changed in the last x minutes in Elasticsearch (ES) | ||
---|---|---|---|
Product: | Koha | Reporter: | Mark Hofstetter <koha> |
Component: | Command-line Utilities | Assignee: | Mark Hofstetter <koha> |
Status: | Needs Signoff --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | emmi.takkinen, fridolin.somers, martin.renvoize, nick, robin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33019 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33008 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29921 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35345 |
||
Change sponsored?: | Sponsored | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: | Bug 33243 - Reindex only Biblios changed in the last x minutes in Elasticsearch (ES) |
Description
Mark Hofstetter
2023-03-16 12:13:59 UTC
Created attachment 148259 [details] [review] Bug 33243 - Reindex only Biblios changed in the last x minutes in Elasticsearch (ES) add a command line option to rebuild_elasticsearch.pl to only reindex Biblios changed in the last x minutes rebuild_elasticsearch.pl -v -b --minutes 100 Reason: we (and others) sometime encounter problem when records are created (especially without items) AND are not automatically indexed in ES To test: instance has to use elasticsearch 0. apply patch 1. create or change new record (biblio) 2. run "rebuild_elasticsearch.pl -v -b --minutes 10" 3. if nothing else "happened" on this intance in the last 10 minutes, this command should yield "1 record indexed" 4. record should be found in Web Search Sponsored-by: Wien Museum I know this is a quick fix and workaround, but it feels a bit like a step back. We had this behavior for Zebra, tean me moved on to the Koha indexer that gave us almost immediate indexing. And with Elasticsearch we have the promise of immediate indexing. It feels like we should explore first on how to fix the issues you and others experience. Yes, at the moment it is also used as a crutch. But it's not just useful for this purpose: quite often we change records just in the database and afterwards just this records need reindexing. I hope I'll find the time soon to fix the underlying issue In other scripts we use a more generic 'where' option, this allows us to use any SQL to limit. I think the same would be better here A where statement might be nice, then you could use the timestamp, but also use it after SQL updates/bulk changes. A where would be great. With also tables : https://git.koha-community.org/Koha-community/Koha/src/branch/master/misc/migration_tools/rebuild_zebra.pl#L94 |