Closed iqbalhusen closed 9 years ago
Full text search is based on prefix matching. That is, you should get matches for “studen”, or “stud”.
If you want matches from anywhere in any word, you’ll need to use the built-in Django __contains filter. However, this won’t use any indexes, so won’t scale to many rows.
On 25 Feb 2015, at 11:00, Iqbal Hussain notifications@github.com wrote:
For example, I have an entry students in a model. If I want to find it by tuden, it can't find. We need to provide stude i.e. only a initial subtring to find a match.
— Reply to this email directly or view it on GitHub.
I have a similar issue, in my case if I search for "Kathmandu Model College" it shows result, but if I mis-spell "Katmandu Model College" with a missing "h" it shows no result at all.
Should it not search for "katmandu", "model" and "college" separately instead of treating them as one word? Or may be I am missing something in my settings, it would be very kind of you if you could point me in the right direction.
All words in the query must match in order for a result to be returned. In your case, the last two words match, but not the first, so no result is returned.
Autocorrecting/suggesting search terms is a great search engine feature, but a bit advanced for database-native full text search.
On 17 Mar 2015, at 03:38, Nitesh Rijal notifications@github.com wrote:
I have a similar issue, in my case if I search for "Kathmandu Model College" it shows result, but if I mis-spell "Katmandu Model College" with a missing "h" it shows no result at all.
Should it not search for "katmandu", "model" and "college" separately instead of treating them as one word? Or may be I am missing something in my settings, it would be very kind of you if you could point me in the right direction.
— Reply to this email directly or view it on GitHub.
For example, I have an entry
students
in a model. If I want to find it bytuden
, it can't find. We need to providestude
i.e. only a initial subtring to find a match.