I am working on a search engine and need help in ranking web pages. I have made a data base table in which i am storing words, link number and frequency. Frequency will tell how many words are appear in that particular link. Now i want to rank every page according to the provided query and display link on screen, which Algorithm will help me? need implementation.

Regards.