[Zope-CMF] Re: [dev] DateIndex and __CEILING_DATE

Tres Seaver tseaver at zope.com
Tue Mar 23 10:24:54 EST 2004


yuppie wrote:

> As proposed in <http://collector.zope.org/CMF/191> we would need to 
> support old and new indexes because Zope 2.5 doesn't have DateIndex / 
> DateRangeIndex.
> 
> What about adding additional methods to the CatalogableDublinCore 
> interface that return the values needed by the new indexes? This way 
> they could co-exist with the old indexes that use the old methods.

I would rather kill off the _CEILING_DATE / _FLOOR_DATE bit altogether; 
  perhaps what we really need is three indexes:

   'effectiveRange' -- a DateRangeIndex against 'effective' / 'expires';

   'effective' -- an as-yet notional DefaultedDateIndex against
    'effective', mapping 'None' as "earliest"

   'expires' -- a DefaultedDateIndex against 'expires', mapping 'None'
     as "latest".

This DefaultedDateIndex class would derive from DateIndex, special 
casing its handling of 'None', presumably via a radio button on the 
index UI itself, which would offer:

   "earliest"  -- map 'None' or "missing" as earlier than all possible
     dates

   "latest" -- map 'None' or "missing" as later than all possible dates

   "ignore" -- don't index content with 'None' or missing values.

We could propose adding this functionality to the Zope core (in the 
DateIndex package), but supply our own implementation in the meanwhile, 
using importability tests.

If this is the straw which causes us to abandon support for Zope 2.5 on 
the head, I could probably live with that.

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




More information about the Zope-CMF mailing list