[Zope3-Users] zc.catalog NormalizationWrapper question...

Gary Poster gary.poster at gmail.com
Thu Dec 18 11:03:31 EST 2008


On Dec 18, 2008, at 9:52 AM, Thierry Florac wrote:

> Hi,
>
> I'm currently using zc.catalog package for value and set indexes on a
> Zope-3.3 application.
>
> I'd also like to use DateTimeValueIndex and DateTimeSetIndex and their
> normalization wrappers to retrieve informations from date-based  
> queries,
> and now just have a small question : in the function which defines  
> these
> index (in catalogindex.py), resolution is set to 2 with a comment  
> which
> says "Hour - good for per-day searches", while in interfaces.py the
> resolution of 2 is given for minutes...

2 is for minutes.  Doctest confirms.

comment in catalogindex.py is buggy.  Feel like adjusting?  Perhaps  
simply noting "per-minute"?  Or perhaps it would be nice to make some  
constants in interfaces.py around where the vocabulary is made?

> I understood until now that I should use "0" for date-based indexation
> and queries...

I suggest hourly for date-based searches *if multiple time-zones are  
in effect*, so one person's date would not be the same as someone  
else's for an event that happens at a particular (UTC) time.

If you don't care about that use case, 0 should work.

> Did I missed something or is there an error somewhere ??

comment error, as above.

Gary



More information about the Zope3-users mailing list