I am sure there are many different methods of determining relevance of search results, but I usually just assign points to the hits I get during the search:
If the search word shows up in the URL: 15 points
If the search word shows up in between <TITLE></TITLE>: 10 points
If the search word shows up in the meta "description": 5 points
If the search word shows up in the meta "keywords": 5 points
Each time the word shows up in the body: 1 point
I am sure there are much more scientific ways of doing it, but I have been doing it this way on small sites (< 1000 pages) since my "mosaic' days.
-- Rich