Saturday, July 6, 2013

Re: Advanced search in django?

On Sat, Jul 6, 2013 at 11:04 AM, Kamal Kaur <kamal.kaur188@gmail.com> wrote:
> But don't know how to implement it in my project to
> search in database. Do I need to keep a
> separate file? or what to do ?


not a separate file, but a separate field. either override the save()
method of your model, or connect to the pre_save() signal to keep it
updated with the 'original' text. for searches simply query this
field against the soundex of the input.

don't forget to add an index to the soundex field

--
Javier

--
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+unsubscribe@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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate