[Zope] Fw: ZTopics and Canned Queries

Shalabh Chaturvedi shalabh@pspl.co.in
Mon, 22 May 2000 10:24:00 +0530


Michael Bernstein wrote:
> Shalabh Chaturvedi wrote:
> > What I want to do is create: (creator : creatorName)
> > And use http://url/FilterCreator?creatorName=shalabh
> >
> > <snipped>
>
> This sounds interesting. How would this end up being
> different from doing a ZCatalog search, though?

(When I say 'ZTopic' in the following I mean my modified version)

It would be a bit more convinient to use and combine different 'queries'.
Assume 'FilterCreator' and 'OpenIssues' are two ZTopic objects:

http://foo/FilterCreator?creatorName=shalabh
Lists all objects where creator=='shalabh'

http://foo/OpenIssues/
Lists all objects where status=='open'

So  now
http://foo/OpenIssues/FilterCreator?creatorName=shalabh
lists all objects where status=='open' AND creator=='shalabh'

Also note that a ZTopic object can have a number of hardcoded 'filters'.
So where a catalog search looks like:
http://foo/report?meta_type=iTrack+Issue&status=open&creator=shalabh
one could use:
http://foo/OpenIssuesFor?creator=shalabh

Another interesting thing possible (but not investigated much) is getting a
different set of results when traversing to a ZTopic object through different
non-ZTopic objects. The ZTopic object might use acquired attribute values in
it's filters.

I'll send a patch to Amos.

Thanks,
Shalabh