How can I automatically update my ZCatalog when items have been added/modified/changed?
Oct 30th, 2008 17:19
games games, unknown unknown, R. David Murray
Any objects that you want to be automatically updated in the Catalog
must have CatalogAware as one of their base classes. And then you
have to add a reindex_object call to any forms that add or update
(I fail to understand why one has to explictly call reindex_object
properties change, even though I think someone tried to explain it to
I suppose you could do something similar with non-catalog aware
where you made sure the add/update forms called the Catalog to index
them, but they wouldn't get deleted from the catalog automatically, or
reindexed automaticaly when moved. If you are writing your own
management screens for those operations, though, you could make it all
work, I think.
You could also use ZSchedular to perioducally run the commands to
reindex your site, if instaneous reindexing is not a requirement.