Hey!I'm trying to understand if my idea of how to use the FilterExtent in
zc.catalog (1.1.1) is
correct (and efficient). I'm also using hurry.query (0.9.3). My current
understanding of
extents is: they can be used to perform a search on a subset of a catalog.
For example,
"give me all objects where attr1 is 'foo' but only for intids 5,6,7 and 10"

Short version:
I have an extent of a large catalog. How do I make a search within this

Long version:
Basically, I have a few content components that can belong to several

My idea is to have an extent in each network. Adding a component to several
networks is simply a matter of subscribing to an added event, looking at the
"networks" attribute and add it to each of the specified networks via the
extent.add method.

>>> list(BigCatalog.refs )
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
>>> list(network1.extent.set)
[1, 2, 5]
>>> list(network2.extent.set)
[2, 3, 5, 6, 11]

In turn, the members of my site can join these networks so I'd want an
extent on
each principal too. This is to allow a kind of "subscription" to his
networks. Also I'd want
some filter capabilities where the user can somehow change settings for the
function, but I'll leave it for now..
Say, we have a member John, who's member of network1 & 2, his extent would
look like this (assuming he's not filtering anything from the networks):

>>> IUserExtent(john).extent.set
[1, 2, 3, 5, 6, 11]

SO, my main question now is, uhm, how do I actually make a search within a
extent? I mean, I could do a search on the big catalog and then make a union
with the
network's extent:

>>> some_result & network1.extent

...But was it really meant to be used like this? I see you can set the
parent catalog on
the extent but I'm still not sure how to use it.

Zope3-users mailing list

Reply via email to