Developing a search algorithm
- by Richart Bremer
I want to create a basic search engine, and I want you to give me some ideas how to filter out the best results for my visitors.
I have three fields regarding a product the user can search in:
Title
Category
Description
I came up with these ideas and I ask you to either competently criticize them or add to them.
If the search term occurs in all three fields it should be among the first results.
If it is in two of the fields it is below the results of 1.
Combine the amount of occurences and output a value in per cent. For instance if in all fields together the term clock appeared 50 times and in all fields together there are 200 words, then the per cent value is 50/200*100 = 25%. Another product entry amounts to say 20% so product one having 25% is listed before product two having 20%.