[Zope-dev] Re: ZCatalog fast as admin,
dog slow as anonymous and other users
Jason Spisak
me at jasonspisak.com
Sun Feb 1 14:03:23 EST 2004
Tres,
I updated the DateIndex.py file to the one from the current 2.6 head.
But I'm still getting the 'integer multiplication' error. Is there
another possibility? Also, it only does this for the 'expires' index.
The 'effective' index reindexed just fine.
Thanks in advance,
Jason Spisak
Tres Seaver wrote:
> Jason Spisak wrote:
>
>> Tres and Seb,
>>
>> Got rid of all the date FieldIndexes and am reindexing the new
>> DateIndexes one at a time from the indexes tab, but I've hit a snag.
>>
>> when I go to reindex 'expires' I get this error immediately:
>>
>> Site error
>>
>> This site encountered an error trying to fulfill your request. The
>> errors were:
>> Error Details
>>
>> Error Type
>> OverflowError
>>
>> Error Value
>> integer multiplication
>
>
> Update lib/python/Products/PluginIndexesn/DateIndex/DateIndex.py to the
> current head of the 2.6 branch, e.g. from:
>
> As a quick workaround, you could patch CMFDefault/DublinCore.py::
>
> ---------------- 8< -----------------------------------
> *** CMFDefault/DublinCore.py 14 Nov 2002 06:48:20 -0000 1.19.4.3
> --- CMFDefault/DublinCore.py 30 Jan 2004 22:22:53 -0000
> ***************
> *** 253,259 ****
> date = getattr( self, 'creation_date', None )
> return date is None and self.__FLOOR_DATE or date
>
> ! __CEILING_DATE = DateTime( 9999, 0 ) # never expires
>
> security.declarePublic( 'expires' )
> def expires( self ):
> --- 253,259 ----
> date = getattr( self, 'creation_date', None )
> return date is None and self.__FLOOR_DATE or date
>
> ! __CEILING_DATE = DateTime( 2037, 0 ) # never expires
>
> security.declarePublic( 'expires' )
> def expires( self ):
> ---------------- 8< -----------------------------------
>
> The better fix would involve not returning the silly _CEILING_DATE at
> all, and then telling the index whether to treat 'None' as low or high.
>
> Tres.
More information about the Zope-Dev
mailing list