Case and sorting/searching

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Sep 17 16:08:59 CDT 2004


On 9/17/04 3:51 PM, "jda" <jda at his.com> wrote:

>>>  You mean like this:
>>> 
>>>   authors = CreateTextField("authors", 128, "English",
>>> Valentina.fIndexByWords + Valentina.fIndexCaseInsensetive)?
>> 
>> yes
>> 
> 
> Ruslan,
> 
> OK, I've done that (and when index by words is operational I'll test
> searches).
> 
> Now, what would be the best "2.x way" of also letting me sort on the
> authors field in a case-insensitive manner? In 1.x I used this method:
> 
> authorsSortMethod = CreateTextField("authorsSortMethod", 128,
> "English", Valentina.fIndexed, "Upper(authors)")
> 
> 
> Is this still the best way in 2.x?

So, you have 

* field

* index it as case-insensitive and by words.
    
* and you need it also sort case-insensitive.
    so we cannot use above index, because it is by words.

Then yes, you will need method.
Its index will be used for sorting.


* in the future I need add algorithm of sorting without index at all.
  then only you will be able avoid this SortMethod.
  on the other hand it will be not indexed. So it can be slower.
  may be in some cases this will be acceptable.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list