On Saturday, June 29, 2013 11:32:19 PM UTC-5, Harjot Mann wrote:
>
> Is there any search query in django which can ignore vowels like I want to 
> make a query which displays all the clients name who writes their name as 
> 'amanjit' or 'amanjeet'. 
> It should take take ee=i or anything like this. Please help me I have to 
> finish my task asap. 
>

http://www.postgresql.org/docs/9.1/static/fuzzystrmatch.html 

You should be able to do it with the django .extra() method easy enough.  I 
believe you can also make a soundex index on columns to improve the 
performance.  

The python jellyfish library is nice for pre-calculating phonetic strings 
and storing them in the database to compare against, or for small data sets 
that you want to process in python.

A third option is something like 
https://github.com/niwibe/djorm-ext-pgfulltext  which uses postgres full 
text search.  The full text search uses tokens that are normalized.  I'm 
not sure it it would normalize amanjit to amanjeet with the default 
configuration, and may be overkill for what you want.

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


Reply via email to