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

Gerry Kirk gerry at faithonline.com
Wed Aug 18 11:37:23 EDT 2004


Was anything more done on this?
- Gerry

Tres Seaver wrote:

> yuppie wrote:
> 
>> Hi!
>>
>>
>> Tres Seaver wrote:
>>
>>> 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';
>>
>>
>>
>> Maybe we should better use a Dublin Core term: 'available' (or 'valid'?)
>> <http://dublincore.org/documents/dcmi-terms/#available>
>> <http://dublincore.org/documents/dcmi-terms/#valid>
> 
> 
> 'valid' is probably a closer match, I think.
> 
>>>   'effective' -- an as-yet notional DefaultedDateIndex against
>>>    'effective', mapping 'None' as "earliest"
>>>
>>>   'expires' -- a DefaultedDateIndex against 'expires', mapping 'None'
>>>     as "latest".
>>
>>
>>
>> I'm not sure if we still need these two at all. Are they used in any 
>> place where we can't use the range index instead?
> 
> 
> There are a number of different use cases which might need one or the 
> other, but not the range.  E.g., archiving wants to find only content 
> which has expired, in order to remove it.  DateRangeIndex is optimized 
> for a different query.
> 
>>> 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.
>>
>>
>>
>> That might make sense. Are there any volunteers for this work?
> 
> 
> Hmm...  /me could be traveling a bit soon.
> 
> Tres.



More information about the Zope-CMF mailing list