[Zope-dev] Problems with CatalogAware?
Toby Dickenson
tdickenson@geminidataloggers.com
Mon, 10 Sep 2001 14:28:05 +0100
On Fri, 31 Aug 2001 15:17:27 -0700, sean.upton@uniontrib.com wrote:
>I have a python product that has a class derived from CatalogAware and
>Folder. I programmatically add instances of these (1000s of them) on an
>automated basis every day in the early morning.
>
>My problem is that whenever I do this, the Catalog is updated with some
>problems:
>1 - Metadata is skewed: DateTime objects are cataloged, and they end up =
with
>the wrong date ('2001/01/01') instead of today's date, even though the
>actual property contains today's date. The index in question is built =
from
>a property.
>2 - Text indexes only get a portion of their text stored in the =
metadata,
>not all of it. The index in question is built from a class method in =
the
>product code.
>
Appologies if you already know this.....
CatalogAware will automatically reindex if an object is added,
deleted, or moved. However it does not automatically reindex if
properties are changed.
It sounds like your index might contain the default (initial) values
for these properties. Do you need to add a call to reindex_object()
after changing them from the defaults?
Toby Dickenson
tdickenson@geminidataloggers.com