matthewerlemiller / projectgenesys

MIT License
1 stars 0 forks source link

Search Returns Strange Results When Searching Multiple Words #19

Open matthewerlemiller opened 9 years ago

matthewerlemiller commented 9 years ago

If you type in Kevin, "Kevin Miller" is the top result. If you type in "Kevin M" the results at the top are those that have first names or last names that start with "M"

It seems each word in the query is being searched individually against first and last names in the database and returning results in alphabetic order.

matthewerlemiller commented 9 years ago

Can we simply prioritize first word hits over second word hits?

Or we can create code that only lets second words search second names.

austenpayan commented 9 years ago

I think the latter is possible. I can check if a space exists in the query and separate the two results in the backend and then merge them back together with first word matches in front of second word matches in the response. I'll work on it.