Hash: SHA1

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.
> Should we not consider this a bug and fix it?

If you can specify the "fixed" behavior in a way that makes logical
sense to everyone:

 - how should the documents without 'lastname' be sorted?

 - Is this choice fixed at indexing time or can it vary by query?

Any proposed fix must also not:

 - break existing applications which depend on the current behavior
   (yes, they exist, I've found that quite useful).  Therefore, making
   "missing" values sort needs to be an option which is configured
   into the index, or else passed with the query.

 - destroy the efficiency considerations which dictated the choice
   in the first place.  This is the *hard* part.  Using the sorted
   UIDs from the sort index, and merging with the other indexes sets
   lazily, gives a *huge* scaling benefit.

- --
Tres Seaver          +1 540-429-0999          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to