Re: [Zope3-Users] searching content objects on created datetime
On Oct 5, 2005, at 9:00 PM, Alen Stanisic wrote: 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. Hi Alen. Take a look at zc.catalog in the sandbox. It has some code to specifically do what you want (assuming I understand it). http:// svn.zope.org/Sandbox/zc/catalog/ Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] searching content objects on created datetime
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=_(uContent 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 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users