That would depend on how you engineer it, so many factors and things can be used to generate relevant search results. You would also make sure you don't infringe on technology already patented by another company.
I know i need some help with learning the algorith not for a search engine site but for general knowledge...
Heh, I have my own search engine under development. The best I can tell you is to use the HTML specification as a guide to creating your own formula.