[Zope] ZCatalog and dates

James Sintz jsintz@ohiohistory.org
Tue, 28 Nov 2000 16:34:57 -0500


They are a date type.

The date index or goLiveDate index is now a keyword index instead of a text
index. However, when I try to find items of the meta_type "news" to catalog
I get an AttributeError with an error value of  __getitem__

<!--
Traceback (innermost last):
  File /usr/local/Zope222/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /usr/local/Zope222/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /usr/local/Zope222/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
    (Object: Traversable)
  File /usr/local/Zope222/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /usr/local/Zope222/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: manage_catalogFoundItems)
  File /usr/local/Zope222/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: manage_catalogFoundItems)
  File /usr/local/Zope222/lib/python/Products/ZCatalog/ZCatalog.py, line
335, in manage_catalogFoundItems
    (Object: Traversable)
  File /usr/local/Zope222/lib/python/Products/ZCatalog/ZCatalog.py, line
584, in ZopeFindAndApply
    (Object: Traversable)
  File /usr/local/Zope222/lib/python/Products/ZCatalog/ZCatalog.py, line
572, in ZopeFindAndApply
    (Object: Traversable)
  File /usr/local/Zope222/lib/python/Products/ZCatalog/ZCatalog.py, line
377, in catalog_object
    (Object: Traversable)
  File /usr/local/Zope222/lib/python/Products/ZCatalog/Catalog.py, line 379,
in catalogObject
  File /usr/local/Zope222/lib/python/SearchIndex/UnKeywordIndex.py, line 32,
in index_object
  File /usr/local/Zope222/lib/python/DateTime/DateTime.py, line 1096, in
__getattr__
AttributeError: (see above)

-->

What am I doning wrong??

Jamey

> -----Original Message-----
> From:	Andy McKay [SMTP:andym@ActiveState.com]
> Sent:	Tuesday, November 28, 2000 3:10 PM
> To:	James Sintz; zope@zope.org
> Subject:	Re: [Zope] ZCatalog and dates
> 
> 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 )
> >