[Zope] Sort keyword index
Dieter Maurer
dieter at handshake.de
Mon Sep 13 15:12:19 EDT 2004
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.
--
Dieter
More information about the Zope
mailing list