I have a ZCatalog set up to index a date field and a title field. When I do a search for meta_type "news" I get a tabular list back of all 18 cataloged items showing, among other things the date field (goLiveDate) and the title field. If I do a search for both meta_type of "news" a date of 2000/11/16 in the goLiveDate field the results page returns "There was no data matching this Catalog query". Yet when I do a search for the meta_type of "news" alone I see that indeed the Catalog contains 2 entries with 2000/11/16 in the goLiveDate field. Why doesn't it find any entries when I search by date? Jamey
Are your dates actually of type date or string? If they are dates make sure your date index is a keyword index and that the input is also of type date. -- Andy McKay, Developer. ActiveState. ----- Original Message ----- From: "James Sintz" <jsintz@ohiohistory.org> To: <zope@zope.org> Sent: Tuesday, November 28, 2000 11:37 AM Subject: [Zope] ZCatalog and dates
I have a ZCatalog set up to index a date field and a title field.
When I do a search for meta_type "news" I get a tabular list back of all
18
cataloged items showing, among other things the date field (goLiveDate) and the title field.
If I do a search for both meta_type of "news" a date of 2000/11/16 in the goLiveDate field the results page returns "There was no data matching this Catalog query". Yet when I do a search for the meta_type of "news" alone I see that indeed the Catalog contains 2 entries with 2000/11/16 in the goLiveDate field.
Why doesn't it find any entries when I search by date?
Jamey
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
If I do a search for both meta_type of "news" a date of 2000/11/16 in the goLiveDate field the results page returns "There was no data matching this Catalog query". Yet when I do a search for the meta_type of "news" alone I see that indeed the Catalog contains 2 entries with 2000/11/16 in the goLiveDate field.
Why doesn't it find any entries when I search by date?
If goLiveDate is of DateTime type and is being indexed as a field index, try using a range, for instance: <dtml-in "Catalog( { 'meta_type' : 'news', 'goLiveDate' : [ someDate , someDate + 1 ], 'goLiveDate_usage' : 'range:min:max' } )"> .... </dtml-in> .... someDate is _.DateTime('2000/11/16 00:00') or something like that. p.s. It's very hard to catch a particular moment in the time continuum, but it is easier with a time interval. :-)
participants (3)
-
Andy McKay -
James Sintz -
Uros Midic