[Zope3-Users] searching content objects on created datetime
Alen Stanisic
alen.stanisic at gmail.com
Wed Oct 5 21:00:42 EDT 2005
Hi,
I am trying to search my content objects on their creation datetime. For
example, a user can enter From and To dates and I would like to retrieve
all content objects based on the date range.
I am thinking I should be using a catalog for this and went about
creating an adapter for the content I would like to search providing the
following interface:
class IContentCreated(Interface):
contentCreated = Datetime(title=_(u"Content Created Time"))
Then I created a catalog with field index named `created` on
IContentCreated interface and contentCreated field.
But now I am stuck on how to search the catalog based on a date range. I
guess I am trying to do something like
my_catalog.searchResults( ??? created > fromDate created < toDate ??? )
Or maybe catalog not the way to go and I should be going straight to the
objects.
Thanks in advance
Alen
More information about the Zope3-users
mailing list