Neil K wrote:
> If there a way to get ZCatalog to give me intersections of results on a
> single index? All the examples and tutorials I've seen are union (OR)
> queries.
> Basically I just want ZCatalog to give me items where keywords contained
> both 'foo' and 'bar'.

You should use a Keyword Index for this.  If your KW index was named
'food' and all your objects had a 'food' sequence attribute, then:

Catalog.searchResults({'food', ['foo', 'bar']})

would find all of the objects whose food property contained both 'foo'
_and_ 'bar'.

> I have browsed through and it seems like it might be possible.
> Disclaimer, I'm pretty new to Zope & python.

In the general case, it's not possible without redesigning Zope's
catalog query language (which implicitly ORs all index queries
together).  For the special case of keywords, use a keyword index.


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to