[Zope3-dev] TTW Indexes

Andreas Jung Andreas Jung <andreas@andreas-jung.com>
Wed, 06 Aug 2003 10:49:08 +0200


--On Mittwoch, 6. August 2003 10:43 Uhr +0200 Martijn Faassen 
<faassen@vet.uu.nl> wrote:

>>
>> This is no longer true for Z2.7.
>
> That's good; I thought the only thing that was overcome was that
> the index had to have the same name as the attribute, but apparently
> now I can cause arbitrary code (on some other object) to be called to do
> indexing?

Exactly...all indexes support this feature where it makes sense
(except Date*Indexes).

>
> I'm sure it's all *possible*, but it's much harder to:
>
>   * write code that makes the same object indexed in multiple catalogs
>     (can't use CatalogAwareness)
>
>   * write code that queries multiple catalogs in one go. This may be
> useful     if you catalog the set of objects A for some basic interface
> and then     some subset B for a more specific interface. Now you want to
> query     set B but you want to make use in the query of information
> cataloged     by the catalog for superset A.
>
> There is no straightforward standard way to do either, as far as I'm
> aware. In the first case, the objects involved need to have (tricky to
> debug) catalog awareness in multiple catalogs, which needs to be
> hand-written or found somewhere. In the second case multi-catalog query
> facilities need to be hand-written or found somewhere.
>
> So, again, my point is not to say something is impossible, but to say
> it's  much harder to work with multiple catalogs in Zope 2. I hope this
> will be made easier in Zope 3. If you're of the opinion that nothing
> possible is  actually hard then the discussion ends of course. :)

Ok, I agree...maybe I haven't seen the problems because I have never
had the need to index one object with multiple catalogs.

Andreas