Small script that checks that each biblio in the DB is properly indexed. parameters: \th this help screen \tc confirm (without this parameter, you get the help screen \tz insert a signal in zebraqueue to force indexing of non indexed biblios \ts silent throw no warnings except for non indexed records. Otherwise throw a warn every 1000 biblios to show progress Syntax: \t./batchCheckNonIndexedBiblios.pl -h (or without arguments => shows this screen) \t./batchCheckNonIndexedBiblios.pl -c (c like confirm => check all records (may be long) \t-t => test only, change nothing in DB
Created attachment 4597 [details] [review] new proposed patch
Just a simple, very tiny remark: If I read your patch, I see that you offer a silent parameter, but your program doesn't do anything with it. That's really silent, isn't it? ;)
Same for -t parameter. It not exists in GetOptions, just in usage. For -s option, i think we can change print "biblionumber $biblionumber not indexed\n" unless $nbhits; with print "biblionumber $biblionumber not indexed\n" unless $nbhits or not $silent; or print "biblionumber $biblionumber not indexed\n" if not $nbhits and $silent (more readability)
I'd like a more verbose description of what it's doing, it's not particularly clear what's happening without reading the source. Also, it should have proper copyright headers. Failing QA for this and the other points mentioned here.
Hi, thx for your comments. 1) copyright added Robin Sheat 2) tryed to rewrite the help text 3) right M. de Rooy ;oD very silent, maybe too, now whe have it 4) due to Jonathan Druart's comment I have added a stealth option to optimise what you print 5) no need to "-t" Jonathan ;o) just do not use -z, some dross... fixed 6) -s was only for avoiding the warn every 1000 biblios so I have added stealth, you have the choice, so your suggest Jonathan was bad placed and I think we must avoid "or" in this case, also you inverted "..not $silent" ;o) so I hope it's ok. thx for testing
Created attachment 10417 [details] [review] the last patch I hope
Created attachment 10535 [details] [review] last patch just because I have forgotten to obsolete
Just saying that the changes applied look good to me, I'm adding it to my list to sign off on, unless someone beats me to it (it's a pretty long list.)
Created attachment 10541 [details] [review] Bug 6566 Checking if DB's records are properly indexed Small script that checks if each bibliorecord in the DB is properly indexed use -h to learn more (MT #6389) Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
My only real comment on it is that it probably doesn't need to be in migration_tools, as it's not really a migration tool. But there's all sorts of stuff in there as it is.
QA comment: * new script, that can't break anything * passes perlcritic * Well documented, and various options to fit various needs (from highly silent if you run as cron to verbose if you run manually) Very usefull when run as cron every week, to check everything it OK. Here is how we use this script at BibLibre: every sunday, we run the script twice : 1st time, sending a flag for zebra to reindex unfound biblios, 2nd time without the flag, to find records that are really not indexable. Passed QA
Enhancement, but I think it's worth being ported to 3.8, and it's safe.