Bug 12368: Rebuild Zebra improvement: allow to specify a DB table
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 4 Jun 2014 15:03:51 +0000 (17:03 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 9 Oct 2015 17:25:58 +0000 (14:25 -0300)
commit2d9c221abcd5337bd93a880357d87f9077347d75
tree1c9f765e226429e348267a580c50ff65a2ee5cf4
parentca00f0ddaeb76106b4aa274fd1848844ae042f58
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
misc/migration_tools/rebuild_zebra.pl