No hold the presses you are right! Yippeee! (I was initially trying to use a ZSearch interface, but it just wasnt happy with that) Thanks bundle. -- Andy McKay, Developer. ActiveState. ----- Original Message ----- From: "Andy McKay" <andym@ActiveState.com> To: "Steve Alexander" <steve@cat-box.net> Cc: "zope-dev" <zope-dev@zope.org> Sent: Thursday, November 23, 2000 3:46 PM Subject: Re: [Zope-dev] least hacky way of cataloguing multiple dates
I have multiple dates in a field as lines. What I would like to do is call objects queried on those dates... this seems very flaky has anyone tried this? The best result so far is to hack the date in a string the text index likes such as Date2000-10-11.... ugghh. I can then query the text index.
Untested:
Make a method that returns a list of DateTime objects. You'll probably want to use a PythonMethod or an External Method.
Fortunately this is a class in Python so I have a list of DateTime's.
Set your ZCatalog up to index these as a KeywordIndex.
Then, query the ZCatalog as you would normally query a ZCatalog with a KeywordIndex, but ensure that you are using DateTime instances as your constraints in your query.
Hmm I still get no results where there should be some. The Catalog has it indexed as [DateTime('2000/11/12'), DateTime('2000/11/13'), DateTime('2000/11/14'), DateTime('2000/11/15')]... will keep fiddling.
Thanks.
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )