[Zope] Sort keyword index

Garito garito at sistes.net
Mon Sep 13 20:02:11 EDT 2004


Dieter Maurer wrote:

>Garito wrote at 2004-9-13 16:39 +0200:
>  
>
>>How can I sort the results of a ZCatalog?
>>
>>I try these:
>>
>>return catalog({'meta_type': 'type1', 'multiplesvalues': 'value1'}, 
>>sort_on='multiplesvalues')
>>    
>>
>
>A requirement for this is that "multiplesvalues" is a "FieldIndex".
>Other types of indexes cannot be used for index based sorting.
>
>  
>
>>...
>> Module Products.ZCatalog.Catalog, line 577, in sortResults
>>AttributeError: documentToKeyMap
>>    
>>
>
>  
>
>>Note that multiplesvalues is a keyword index and I need all objects that 
>>have value1 into multiplesvalues then sort by multiplesvalues
>>    
>>
>
>You cannot use index based sorting but must implement your
>own (external) sorting.
>
>  
>
Hi Dieter
Thanks for your response
At these time I had implemented an external sorter but
Is there any kind of "rules" to create these kind of behavior integrated 
with ZCatalog?

Thanks!!!!



More information about the Zope mailing list