Hi, I am building a new site that is going to have a lot of different types of products and I need to add a search feature from the home page that would allow the user to find relevant items.
I see this everywhere and some of the more advanced ones return results with a percentage of how relevant the results were.
IE, if I did a search for 25" widgets I might get some results like
25" Widgets - 100%
Black Widgets - 80%
etc.
I assume that I need to use full text indexing on my fields in my DB but other than that I have no clue where to go.
if anyone can shed some light I'd really appreciate it.
thx for your time,
Burr
site product search
Moderator: General Moderators
Are you asking how to build the search feature, or how to do the percentage thing? The search feature could just be a simple SQL query, and I would imagine the percentage thing is how many of your search string words showed up in the result entry.
(P.S. If you WERE the Alpha and the Omega, you wouldn't need to ask this question now would you?
)
(P.S. If you WERE the Alpha and the Omega, you wouldn't need to ask this question now would you?
Interesting... the bbCode didn't work...McGruff wrote:If you are using mysql, see [mysql_man]Full-text Search[/mysql_man] for info on obtaining relevance.
http://www.mysql.com/doc/en/Fulltext_Search.html