[Zope-CMF] Portal Search Returns Everything + Deleted Documentstoo

Chris Withers chrisw@nipltd.com
Wed, 10 Jul 2002 21:19:05 +0100


Tres Seaver wrote:
> 
> On Tue, 2002-07-09 at 20:30, Jeff Ross wrote:
> > I was just wondering why when you leave the search box empty in a portal
> > that it returns everything? Shouldn't it return nothing? Is this addressed
> > in CMF 1.3?
> 
> No.  The logic here is that search criteria define a "subtractive
> filter"; 

Hehe, I remember Chris M once describing this as existing for 'hysterical
reasons', I'm inclined to agree ;-)

> omitting to define any criteria thus creates a "pass-all"
> filter.  This behavior is the "normal" way of processing ZCatalog
> results;  

...although it's not normal for anyone I've ever spoken to who's trying to do a
search...

> you can, of course, skin the search method such that it
> checks for the absence of query string / form variables and
> short-circuits the test.

shame this logic has to be duplicated in any ZCatalog code that provides a
sensible user experience :-S

cheers,

Chris