[Zope-dev] Catalog class--does it support boolean queries?

Casey Duncan cduncan@kaivo.com
Thu, 14 Dec 2000 15:39:49 -0700


Marc Conley wrote:
> 
> I am working on a project which requires the use of the Catalog class
> (versus ZCatalog) for
> indexing and querying. I have basic full text indexing and querying working
> correctly but
> boolean queries seem not to work. Should boolean queries work using Catalog
> or is it
> necessary to use ZCatalog instead to get that functionality?
> 
> This is how I am submitting the query to the Catalog object:
> 
> results = sdb.cat({"content" : query})
> 
> where sdb is a ZODB, cat is the catalog object, and content is the name of
> the full-text index. query is
> the query the user typed, which could be
> 
> "(apples and oranges) or plums"
> 
> (without the quotes) for instance. Thanks in advance for any assistance
> anyone can provide on this question.

You should be able to do what you want using just catalog.

If your example query is an example of something you are really using,
try it without parens.

e.g. "apples and oranges or plums"

AFAIK grouping in query strings is not supported.
-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>