[Zope] RE: Two newbie questions

Michel Pelletier michel@digicool.com
Thu, 9 Sep 1999 13:19:43 -0400


> -----Original Message-----
> From: Amos Latteier [mailto:Amos@digicool.com]
> Sent: Thursday, September 09, 1999 12:58 PM
> To: 'Michael Bernstein'
> Cc: webmaster@zope.org; zope@zope.org
> Subject: RE: [Zope] RE: Two newbie questions
> 
> 
>  Michael Bernstein wrote:
> 
> > In any case, ZTables does indeed have the 'hierarchy' 
> > functionality that we
> > want, but it has yet to be released. A related proposal 
> > called 'Topics' popped
> > up on the Zope site yesterday:
> > http://www.zope.org:18200/Members/Amos/TopicProposal , which 
> > seems to apply
> > ZTables Hierarchies to ZCatalog albeit with a somewhat 
> > different interface.
> > 
> > This is EXACTLY what I've been waiting for! I knew you guys 
> > would get around to
> > it eventually. With the minor quibble that it would be nice 
> > to have logical
> > operators besides 'OR' to chain queries within a Topic, this 
> > proposal seems
> > perfect.
> 
> Well, if you are using only one ZCatalog, you can AND queries by
> combining them. Then all you really lack is OR. Actually, a 
> NOT would be
> pretty handy too.
> 

The ZCatalog parser understands 'and' 'or' and 'andnot'.  It also
supports '...' which is the 'near' operator.  I have not actuall tested
any of this though, it all comes from legacy ZTables code.

Ok, just verified that 'and' and 'or' work just dandy with Catalog.  Go
to the beta site and search for:

'Michel and Amos'
'Michel or Amos'

and it works.  Cool!  andnot and '...' don't seem to do much though...

> One concern I have is making the query building and manipulation too
> complex. Probably we'll start with a pretty simple scheme and 
> expand it
> later.
> 

I like the idea of sticking with simple boolean searching.  Composite
booleans would be cool to:

(Michel and Amos) and (Paul or Jim)

For greater complexity, there are also 'quoted' queries, which means
phrase matching:

"eight queens"

should return any phrases about the "eight queens" chess problem, and
not the phrase "eight spectacular drag queens in high heels".

And, of course, globbing:

Mich*el

Should find both 'Michel' and the incorrectly spelled 'Michael'. ;)

The TextIndex parser seems to have code for parens and quotes, so it
might do this, or it might at least hook it, or it may do something
completly different.  I'm UML modeling the Catalog as we speak.

-Michel