[Grok-dev] zope catalog datetime search
Shrek Zhou
zgwmike at gmail.com
Tue Dec 14 09:26:19 EST 2010
Thanks, jw
I just want to change your code from
date_term = hurry.query.value.Between(
('', 'creation_time'), lower, upper)
q = getUtility(IQuery).searchResults
return q(date_term)
to
date_term = hurry.query.value.Between(
('', 'creation_time'), None, upper)
q = getUtility(IQuery).searchResults
return q(date_term)
or
date_term = hurry.query.value.Between(
('', 'creation_time'), lower, None)
q = getUtility(IQuery).searchResults
return q(date_term)
with which I expect all object before the upper or after the lower dates.
Regards
Shrek
Jan-Wijbrand Kolman-3 wrote:
>
> On 12/12/10 05:02 , Shrek Zhou wrote:
>> hi,
>> I have a datetime ValueIndex, the between search is fine, but I want to
>> do a less than or greater than search, I use hurry query's value.Le and
>> value.Ge to do it. but I only got all the objects. it does not work as
>> expected. any idea?
>
> All I can say at this moment, without having more details about your
> setup, is that we are using datetime ValueIndexes succesfully. One of
> the queries we use looks like this:
>
> ...
> date_term = hurry.query.value.Between(
> ('', 'creation_time'), lower, upper)
> q = getUtility(IQuery).searchResults
> return q(date_term)
> ...
>
> Can you tell a bit more about your index- and search-related code?
>
> regards, jw
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
>
>
--
View this message in context: http://old.nabble.com/zope-catalog-datetime-search-tp30436727p30455087.html
Sent from the Grok mailing list archive at Nabble.com.
More information about the Grok-dev
mailing list