[Zope-dev] Questions about ZCatalogs

Alexandre Ratti alex.ratti@ras.eu.org
Tue, 23 Nov 1999 20:24:34 +0100


Hello,


I read in the zope lists archives that ZCatalogs support:
- the 'andnot' operator;
- a near operator ("...");
- phrasing.

Is this acurate? I cannot find how to use any of this in Zope 2.1b2 on Win NT4.


1) The andnot operator
If it is available, could you provide a syntax example?

This works: <dtml-in "searchResults({'title':'site and zope'})">
This works too: <dtml-in "searchResults({'title':'site or zope'})">
This doesn't return any answer: <dtml-in "searchResults({'title':'site 
andnot zope'})">
This doesn't either: <dtml-in "searchResults({'title':'site and not zope'})">


2) Near operator
Can you provide an example? How near is 'near'?


3) Phrasing search
Does ZCatalogs support searching for an exact phrase, eg. "blue cars"? If 
supported, this would return only docs where the phrase occurs, not the 
individual words. I'm really interested in this feature.  Could you provide 
a DTML syntax example?

I found the following example (not disrespect intended MartijnF ;-) in an 
email but I get a Document Template Parse Error when I run it:

<dtml-in "searchResults({'body_text': '"Martijn Pieters" and not "Martijn
Faassen"'})">...</dtml-in>


Many thanks.

Alexandre