[Zope-dev] ZCatalog stuff

Tres Seaver tseaver@digicool.com
Thu, 22 Feb 2001 08:10:10 -0500 (EST)


On Thu, 22 Feb 2001, Chris Withers wrote:

> I think this is _exactly_ what I've been looking for for ages,
> especially, I'm guessing, that if you don't specify 'used'
> then:

No, 'used' has *no* effect on the processing of the search;  it
exists only to allow keeping track of the indices used in
searches across catalogs.

> Okay while I'm here, one final one.
> 
> We have the sort_on and sort_order parameters, they'll return
> stuff ordered like:
> 
> Aardvark
> Badger
> anteater
> bird
> 
> Whereas most humans would think the following would be more
> readable:
> 
> Aardvark
> anteater
> Badger
> bird

Chris, this necrohippophilic sadism has to stop!  "most humeans"
does *not* map to "English speakers who prefer case-insensitive
collation."

Case-flattening is a lossy operation;  there is *no way* you are
going to get it by default.  If you want the catalog to do a
case-insensitive search / sort, then create a method on your
object which does the approprate case-flattening, and index that
instead of the "real" attribute.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org