[ZCM] [ZC] 377/ 2 Comment "ZCatalog weirdness"

Collector: Zope Bugs, Features, and Patches ... zope-coders@zope.org
Fri, 03 May 2002 11:30:30 -0400


Issue #377 Update (Comment) "ZCatalog weirdness"
 Status Pending, Catalog/bug medium
To followup, visit:
  http://collector.zope.org/Zope/377

==============================================================
= Comment - Entry #2 by ajung on May 3, 2002 11:30 am

This query looks somewhat wrong. I assume 'goLiveDate'
is a FieldIndex. I don't understand why you use
'news_goLiveDate' to instead of the 'goLiveDate'.

The query should like:

..Catalog({'meta_type' :{'query':'news'},
           'goLiveData':{'query':[_.DateTime(now),_.DateTime(nw)],
                         'range': 'min:max'}
          }
         )

And it is important that the corresponding FieldIndex
is *not* an old pre-2.4 FieldIndex (it might be necessary to 
delete the old index and recreate a new one).

-aj

________________________________________
= Request - Entry #1 by Anonymous User on May 2, 2002 11:41 pm

I have recently upgraded to 2.5.1 and the following doesn't seem to ever
evaluate as true any more. It has worked in several different versions
of Zope with the last one being 2.4.3. When I upgraded to 2.5.0 and
discovered this would never evaluate as true I re-index all the items in
my catalog.

<dtml-let now="ZopeTime().strftime('%Y/%m/%d') + ' 00:00'"
            a="Catalog( { 'meta_type' : 'news',
              'news_goLiveDate' : [ _.DateTime(now), _.DateTime(now)],
              'goLiveDate_usage' : 'range:min:max' } )"

<dtml-if a>
 some code
</dtml-if>
</dtml-let>

Any ideas why it would have stopped working. I have made no other
changes except the upgrade. I tried importing my files and re-indexing
and moving the data.fs.
==============================================================