[Zope3-dev] Index integration
Jim Fulton
jim at zope.com
Mon Feb 14 14:26:58 EST 2005
Dieter Maurer wrote:
> Jim Fulton wrote at 2005-2-14 10:20 -0500:
>
>>Dieter Maurer wrote:
>>...
>>
>>>I propose as alternative a new concept "DependentObject", represented
>>>by the interface "IDependentObject". A "dependent object"
>>>is part of a primary object and is indexed under this primary
>>>object. Thus, a "dependent object" can provide values for
>>>the indexing of its primary object but is not itself indexed.
>>>
>>>"IDependentObject" has a single method (or attribute, if you prefer):
>>>'getPrimaryObject' returning the primary.
>>>The catalog determines the uid for an indexing request for "o"
>>>from its primary object, if "o" is a dependent object.
>>>However, the set of indexes that need an update is determined
>>>from "o"'s interfaces and "o" provides the values for the reindexing.
>>>
>>>This way, there is no need for interface specific "Changed" events.
>>
>>I'm not sure I follow this. Are you saying that you'd generate
>>an ObjectModified event for the dependent object and then decide the
>>indexes to update according to the type of the dependent object?
>
>
> Indeed.
>
> But the object for which the indexes are updated is
> is not the dependent object but its primary object.
>
> Dependent objects are not catalogued (indexed) by themselves.
> With respect to cataloguing they behave as part of their
> primary object.
Right. This feels pretty complicated. Maybe I'm missunderstanding,
or maybe I just need to think about it some more. :)
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list