On Friday, February 8, 2008 2:41:15 AM UTC+5:30, Jacob Kaplan-Moss wrote: On 2/7/08, [email protected] <javascript:> <[email protected]<javascript:>> wrote: > User.objects.filter(first_name__sounds_like="John") > > which would produce and SQL statement like: > > WHERE DIFF(SOUNDEX(first_name), SOUNDEX("John")) >= 3 > > Any plans for it?
As a built-in, probably not -- it is indeed somewhat db-specific, and if we started added magic lookups for every possible query type we'd never get anything else done. Luckily, it's very easy to do manually:: User.objects.extra( where=["DIFF SOUNDEX(first_name), SOUNDEX(%s)) >=3"], params=["John"] ) Jacob It is not working like this. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.

