In Python version I use the ComputedProperty to normalize the string from a 
property. After that it is only a question of normalize the user input a 
make the search on the computed property. You can search for prefixes with 
a code like this:

https://github.com/renzon/gaepermission/blob/master/gaepermission/model.py#L38

This way, you avoid that "Zuper" appears when you are searching for "Super" 
prefix.

For normalization itself I use this lib:

https://github.com/un33k/python-slugify

It is used to generate slugs, but it can be used for normalization as well.

Regards,

On Monday, January 5, 2015 7:38:56 AM UTC-2, Jaroslav Záruba wrote:
>
> Well, simply deunicoding/asciifying the strings will have to do.
>
> On Friday, January 2, 2015 8:58:53 AM UTC+1, Jaroslav Záruba wrote:
>>
>> Hello
>>
>> For optimization purposes (within browser) I need to mimic whatever 
>> processing is done to the "needle" string before it is matched against the 
>> indexes.
>> Basically it means to translate "weird" characters into their "boring" 
>> (and lowercase) representations:
>>
>>    - ř,Ř => r
>>    - ě,é,ë,Ě,É,Ë => e
>>    - ...
>>
>> What approach should I take to get as close as possible to what the 
>> Search API does?
>>
>> Cheers
>>   Jarda
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to