[Zope-dev] ZCTextIndex and ZCatalog conundrum

Andreas Jung Andreas Jung <andreas@andreas-jung.com>
Thu, 01 May 2003 11:46:17 +0200


--On Donnerstag, 1. Mai 2003 10:39 Uhr +0100 Chris Withers 
<chrisw@nipltd.com> wrote:

> Andreas Jung wrote:
>> First, you can not use the sort_on parameter since TextIndexes do not
>> provide
>> the necessary keyForDocument() method.
>
> Indeed. Is there any way keyForDocument could be implemented to do what's
> required?

No, the ranking value is bound to the result set and not to the index. 
Since the
ZCatalog asks the index for key and not the result set. I agree that it 
would be nice
to have a better sorting functionality based on the ranking informations of
result sets but a change might break the  API for indexes.

-aj