[Zope] Re: record count in catalog

Chris Withers chris at simplistix.co.uk
Fri Jun 20 06:24:06 EDT 2008


Dieter Maurer wrote:
> Tres Seaver wrote at 2008-6-15 16:18 -0400:
>> ...
>>> The Catalog tab in my catalog says this:
>>>
>>> The catalog "mycatalog" contains 30,345 record(s) in the path "/".
>>>
>>> But when I sort and return a list of cataloged objects I only have 19,881.
>>>
>>> Here is the script call to retrieve the records:
>>>
>>> context.mycatalog.search( {}, sort_index='lastname' )
>>>
>>> Why don't the numbers match up?
>> Some of your objects don't have a 'lastname' attribute, and so when
>> sorting, they get dropped.

Ah, now that's interesting...

> Should we not consider this a bug and fix it?

Yes, this has bitten me before and I have a feeling I may have already 
submitted it as a bug somewhere. Google is your friend...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope mailing list