[Zope] using ZCatalog to search multiple data containers

Jay, Dylan djay@lucent.com
Wed, 25 Aug 1999 13:51:43 +1000


> -----Original Message-----
> From: Michel Pelletier [mailto:michel@digicool.com]
> Sent: Wednesday, August 25, 1999 00:24
> To: 'Jay, Dylan'; 'zope@zope.org'
> Subject: RE: [Zope] using ZCatalog to search multiple data containers
> 
> > 
> > Something that has been bothering me with this whole ZCatalog 
> > thing is how
> > do I search things other than the Zope ODB. More 
> importantly how do I
> > combine a search that works with the ZCatalog with things 
> > from databases.
> > Lets say I have a database driven FAQ. How do I put a single 
> > search field on
> > a site that finds normal DTML documents as well as parts of the FAQ?
> 
> This can be done, but it hasn't been done, so the kinks have not been
> worked out.  Basicly, anything in Zope that can be mapped to a URL can
> be cataloged, so if your ZSQL queries map to URLs then they 
> can be used.
> 
> You would probably find using plugable brains handy here, as the brain
> you write can use the CatalogAware class to make your brains catalog
> themselves.
> 
> Even better, in Zope 2.1, you will be able to select a ZClass for a
> plugable brain for both ZSQL methods and Catalogs.
> 
> This would make a great howto, if you whip up an example.  If not, I
> might have some time in the future to work on it, if i get some
> resources allocated to it.

Ok, I sort of see what your getting at but what if you have content that
can't be mapped using a url. Like a tradittional form input that results in
a sql database search and a result list. Lets say a bug tracking system. And
I want a combined way to search for anything in my web pages or a bug that
matches the criteria. I imagine it would be stupid to get the ZCatalog to
index the sql database when it is already indexed, so I imagine what I'm
after is a way of 
a) Producing a result set from an sql query that is compatible with the
ZCatalog result set.
b) Combining two or more result sets in a way that makes sense. ie some way
of objective way of scoring results. 

It would seem to me that a framework for this sort of thing is something
lots of people would want.

Dylan.