0

How can I add custom filtering to Django search? currently lookup_expr='icontains' match the words that contains string.

Example:

I want to search the work "elephant". if i type ele, phant, then icontains works. But if i type elepant (missed h) then icontains wont return anything.

So I want to build the search text that matches similar word. How can I do that in django?

Karesh A
  • 1,731
  • 3
  • 22
  • 47

1 Answers1

0

This is called "full text search". If you are using postgres database then django has some native support for it. Otherwise, there is a huge branch of software devoted just to full text search out there, can start your journey here.

Community
  • 1
  • 1
serg
  • 109,619
  • 77
  • 317
  • 330