Developing a search algorithm
Posted
by
Richart Bremer
on Programmers
See other posts from Programmers
or by Richart Bremer
Published on 2012-09-29T14:51:34Z
Indexed on
2012/09/29
15:51 UTC
Read the original article
Hit count: 180
algorithms
|search-engine
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%.
© Programmers or respective owner