[Zope-CMF] Portal Search Returns Everything + Deleted Documents too

Tres Seaver tseaver@zope.com
10 Jul 2002 00:03:32 -0400


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

> Also, I noticed that the search results include documents that were deleted.
> How do I make sure that when a document is removed, it is uncataloged?

This is *not* intended behavior.  If you can repeat it reliably
against CMF 1.3b2, please file a collector issue with the "recipe"
at:

  http://collector.zope.org/CMF

An ideal test case should be repeatable starting from a newly-created
CMF Site, which can make it a little tricky.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com