Trying to use ngram for first time to solve a search problem.
We have a case where we need to do partial mach of input data.
Lets say I have the following data in my user index in the name field
Doc 1 : Jean Claude Van Damme
Doc 2 : Jean Claude Vandamme
Doc 3 : Jean Van Damme
Doc 4 : Jean Jhonny Dammy
and I search for Jean or Jean Claude. its straight forward I get the results expected. But when I search for Damme. I need to ensure that I get only the first 3 docs and not that last one. When I use ngram I see that it returns 4th doc also as result as I have set min_gram as 3, I can't increase it to 5 as my minimum seach support is 3 characters.
I cannot predict what my user will input, she may input 3 characters or 5 characters or 10 characters. What I need is that all those characters entered should be there in the document matched without fail. How can I achieve this?