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
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
Duplicate of Bug 35345 ?