[Bug 12368] New: Rebuild Zebra improvement: allow to specify a DB table
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Bug ID: 12368 Summary: Rebuild Zebra improvement: allow to specify a DB table Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Currently the --where parameter only allow to specify a condition on fields in the biblioitems table. For some needs it would be great to specify a condition on the field in the items table. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28672 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28672&action=edit Bug 12368: Rebuild Zebra improvement: allow to specify a DB table Currently the --where parameter only allow to specify a condition on fields in the biblioitems table. For some needs it would be great to specify a condition on the field in the items table. The use case is the following: you want to reindex biblios with items modified since a specific timestamp. Test plan: 1/ Pick an item randomly in your catalogue 2/ Edit it and save 3/ Note that the items.timestamp has been set to today but not the biblioitems.timestamp 4/ launch rebuild_zebra without the new parameter perl misc/migration_tools/rebuild_zebra.pl -b -v --where "timestamp >= XXX" where XXX is the today date (e.g. "2014-06-05 00:00:00"). Note that the biblio has not been indexed. 5/ launch rebuild_zebra using the new parameter: perl misc/migration_tools/rebuild_zebra.pl -b -v -t items --where "timestamp >= XXX" Note the biblio has been indexed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Shouldn't I be told that: .../rebuild_zebra.pl -t stupid -b -a -r -v is an invalid choice, rather than just correct to use biblioitems? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28793 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28793&action=edit Bug 12368: Die if the --table value is not allowed. If the table given in parameter is not in the white list, the script should die rathen than correct to a default value. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to M. Tompsett from comment #2)
Shouldn't I be told that: .../rebuild_zebra.pl -t stupid -b -a -r -v is an invalid choice, rather than just correct to use biblioitems?
Yes, agreed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28672|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 34749 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34749&action=edit Bug 12368: Rebuild Zebra improvement: allow to specify a DB table Currently the --where parameter only allow to specify a condition on fields in the biblioitems table. For some needs it would be great to specify a condition on the field in the items table. The use case is the following: you want to reindex biblios with items modified since a specific timestamp. Test plan: 1/ Pick an item randomly in your catalogue 2/ Edit it and save 3/ Note that the items.timestamp has been set to today but not the biblioitems.timestamp 4/ launch rebuild_zebra without the new parameter perl misc/migration_tools/rebuild_zebra.pl -b -v --where "timestamp >= XXX" where XXX is the today date (e.g. "2014-06-05 00:00:00"). Note that the biblio has not been indexed. 5/ launch rebuild_zebra using the new parameter: perl misc/migration_tools/rebuild_zebra.pl -b -v -t items --where "timestamp >= XXX" Note the biblio has been indexed. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28793|0 |1 is obsolete| | --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 34750 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34750&action=edit Bug 12368: Die if the --table value is not allowed. If the table given in parameter is not in the white list, the script should die rathen than correct to a default value. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34749|0 |1 is obsolete| | Attachment #34750|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 34891 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34891&action=edit [PASSED QA] Bug 12368: Rebuild Zebra improvement: allow to specify a DB table Currently the --where parameter only allow to specify a condition on fields in the biblioitems table. For some needs it would be great to specify a condition on the field in the items table. The use case is the following: you want to reindex biblios with items modified since a specific timestamp. Test plan: 1/ Pick an item randomly in your catalogue 2/ Edit it and save 3/ Note that the items.timestamp has been set to today but not the biblioitems.timestamp 4/ launch rebuild_zebra without the new parameter perl misc/migration_tools/rebuild_zebra.pl -b -v --where "timestamp >= XXX" where XXX is the today date (e.g. "2014-06-05 00:00:00"). Note that the biblio has not been indexed. 5/ launch rebuild_zebra using the new parameter: perl misc/migration_tools/rebuild_zebra.pl -b -v -t items --where "timestamp >= XXX" Note the biblio has been indexed. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 34892 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34892&action=edit [PASSED QA] Bug 12368: Die if the --table value is not allowed. If the table given in parameter is not in the white list, the script should die rathen than correct to a default value. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion CC| |tomascohen@gmail.com --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Couldn't we just make the --where clause to apply to an inner join of both tables instead? This way we would avoid adding complexity. We know those tables should be one if it didn't imply some performance penalty. Setting to "In discussion", to discuss this idea. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Tomás Cohen Arazi from comment #9)
Couldn't we just make the --where clause to apply to an inner join of both tables instead? This way we would avoid adding complexity. We know those tables should be one if it didn't imply some performance penalty.
I didn't want to increase the execution time for other users. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthias.meusburger@biblibr | |e.com --- Comment #11 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- I tend to agree with Jonathan on this one: - It's better not to increase execution time when not needed. - This patch does not add that much complexity. - Wouldn't it add approximatively the same amount of complexity if using an inner joint? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sending back to the RM queue. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- in my opinion, -t should not be used for --table, it is usually used for --test -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|System Administration |Command-line Utilities CC| |katrin.fischer@bsz-bw.de, | |robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12368 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15325 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15325 [Bug 15325] rebuild_zebra.pl table option (-t) doesn't work -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org