0
Search Bar to Redirect to Other Page From Website
So I wanted to create a search bar on my website. Let's suppose I've 200 locations (as a value). Now when I enter "Sah" it should come up with list from locations relevant to "Sah" like "Sahpura" "Abcsah", etc. and I made it. But now I want this search bar to show only first 5 relevant options because for now it shows many. And if possible, how can I make it understand wrong spelling? Like "Sahpura" should also be listed for search "Sha". Thanks!
1 Respuesta
+ 2
The issue of wrong spellings can be solved by AI or searching for every letter like
s + h + a
and every word
sha
then ranking them using a point system
1 point = 1 letter in common
10 points = 1 word in common
so sha would get 3 points