>
>
> Aaron Stone wrote:
>> On Tue, Jan 25, 2005, Paul J Stevens <[EMAIL PROTECTED]> said:
>>
>>
>>>I was pleasantly surprised by your command trace yesterday. Apparently
>>>c-client is smart. Smart enough to hide server-errors from the client.
>>>The fact that
>>>
>>>A01 SORT (REVERSE ARRIVAL) US-ASCII ALL
>>>
>>>failed is very important in this respect. The build_imap_search function
>>>is full of TODO statements for search keys that are silently ignored
>>>whereas US-ASCII and UTF-8 which are both explicitely required...
>>
>> [snip]
>>
>> Looks like SORT (ARRIVAL) US-ASCII ALL kinda works in 2.0.3, because for
>> ARRIVAL, there's:
>>
>>   if(sorted && (strcasecmp(search_keys[*idx], "arrival") == 0)) {
>>       key.type = IST_SORT;
>>       strncpy(key.search, "order by pms.internal_date", MAX_SEARCH_LEN);
>>       (*idx)++;
>>
>> Whereas (REVERSE ARRIVAL) fails because REVERSE doesn't work. In 2.0.2,
>> US-ASCII itself threw an error, and so in both cases fallbacks were
>> used.
>>
>> So REVERSE ARRIVAL can be done just with a "desc" in the "order by"
>> clause. However REVERSE with any of the other sorts, working or not,
>> won't
>> work.
>
> I tried that yesterday. Won't work even for ARRIVAL, because of the way
> the
> result set is constructed in db_search. But perhaps I was just being
> dense.


Accualy paul you could do this with a search of the cmd string to set a
key for reverse and then just tell my btree code not to re-order the mid's
as it takes them in reverse to being with if I rember correctly.

Thanks,
Leif

p.s. Until there is header caching anything but Date sort is painfully
slow becuase the code has to reparse all the messages headers with the
mime code. If we could somehow make the extensible table for header values
and keys and then a table of key refs we could make the mime parsers just
check for the value for that uniq key in the "cache" if it isn't there add
it and then just have a ref to the messages uniq id, then anytime the mime
parse header is called it could check for an already parsed header. This
is my .02 of how I would quickly whip it out, I wanted to get a little
crazy also and add memcached interface to the header caching code for
large sites like my customers where many many people will be grinding
throught the cached headers..etc.

Reply via email to