[Zope] automagic reindexing of objects
Jürgen Herrmann
Juergen.Herrmann at XLhost.de
Fri Jun 17 09:24:27 EDT 2005
[ Jonathan wrote:]
>
> ----- Original Message -----
> From: "Jürgen Herrmann" <Juergen.Herrmann at XLhost.de>
>> i make heavy use of indexes in my extension classes. these all inherit
>> from catalogpathaware, so i have to call object.reindex_object() on
>> each changed instance. calling it from attribute getters/setters f.ex.
>> is not a good idea, because changing 3 attributes will reindex the
>> object
>> 3 times.
>>
>> what i'd like to have is that such objects are reindexed automatically
>> before comitting a transaction.
>
> You can't index before committing. I think you need a different strategy:
> how about creating all of the new objects and then call the
> catalog/indexing
> mechanism. We do this for one of our large volume catalogs (1m+ records),
> by having an object class/catalog that are not 'aware' and then manually
> (well, thru a python routine) cataloging/indexing the objects.
hmm, it's not about newly created objects. i want to have automatic
REindexing, in cleartext - i want to make it easy for the programmer:
he/she should just call an attribute setter or maybe change a relation
and just before the transaction would be committed to the storage, i'd
like to cycle through all dirty objects and reindex them, if they're
catalogpathaware (or implement reindex_object()...).
>
> HTH
>
> Jonathan
juergen
_______________________________________________________________________
>> XLhost.de - eXperts in Linux hosting <<
Juergen Herrmann
Weiherweg 10, 93051 Regensburg, Germany
Fon: +49 (0)700 XLHOSTDE [0700 95467833]
Fax: +49 (0)721 151 463027
ICQ: 27139974 - IRC: #XLhost at quakenet
WEB: http://www.XLhost.de
More information about the Zope
mailing list