[Zope-CMF] Re: Wondering about catalog tool bloat

Tres Seaver tseaver at zope.com
Tue Apr 20 16:31:13 EDT 2004


yuppie wrote:

> Alec Mitchell wrote:
> 
>> It seems to me that the default CMF catalog tool is a bit bloated.  My 
>> main concern is that FieldIndexes are used for Date, created, 
>> effective, modified, start, and end (the last two created by 
>> CMFCalendar), when they should probably all be DateIndexes.  Plone has 
>> already made some of these changes, but it would be nice to have it in 
>> the CMF itself.

DateIndex wasn't available < Zope 2.6.  Given that we are ditching 
compatibility with older Zope versions, we can safely rely on the 
existence of the newer index classes (DateIndex and DateRangeIndex).

> This is a known problem. See this thread 
> <http://mail.zope.org/pipermail/zope-cmf/2004-March/020461.html>
> and this collector issue
> <http://collector.zope.org/CMF/191>.
> 
> The meta problem is: There are not enough volunteers to resolve issues 
> like that.
> 
>> Also, what is the purpose of the metadata redundancy between 
>> ModificationDate and modified or Date and CreationDate (which are also 
>> redundant in the indexes)?

Metadata exists only to allow displaying values in search results 
without needing to activate the underlying object.  You may safely 
remove any metadata column which is not used by any searc results 
template.  Note that metadata columns aren't "redundant" with indexes; 
the index values are not available to the "catalog brains" objects 
returned by searchResults.

> I guess we don't need all of them. But in general the DublinCore methods 
> return ISO strings while the CatalogableDublinCore methods return 
> DateTime objects. See interface and implementation for details.

Right:  indexing the stringified values *is* redundant;  nobody wants to 
search against that representation.  Note that, depending on the use 
case, putting the stringified versions into metadata columns may still 
be useful, in which case you shouldn't need the "real" date versions (in 
metadata columns).

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




More information about the Zope-CMF mailing list