[Zope] Re: ZCatalog - OR'ing on different columns (indices)

Steve Alexander steve@cat-box.net
Fri, 25 Aug 2000 19:25:25 +0100


Aleksander Salwa wrote:
> Is there any better method of OR'ing on differend indices in quering
> ZCatalog, then the method described in 'Advanced ZCatalog Searching'
<deletia>
>
> It seems to me to be common case, when we show to user simple search form
> with only one input (that is where 'userInput' came from) and 'Go!'
> button. User don't want to know, that we have our data splited in many
> properties. But on Zope side it's very good to have it structured in that
> way - so how to reconcile these things ?


I use more than one ZCatalog at a time. One called SiteSearch stores
full-text-search information on all the objects in a site. Then, I have
other ZCatalogs for domain-specific searches.

I use ZPatterns to do this.

My objects are derived from DataSkins. I use CatalogTriggers to index my
objects in the appropriate catalogs. CatalogTrigger is from Itamar
Shtull-Trauring's ZPAddons package. (There will be a new version of
this, renamed DataSkin addons released this weekend.)

You could also modify CatalogAwareness.py to make an object aware of
several catalogs at once.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net