my team and I are working on a football hub website and we would like to make the in-page search engine as powerful as possible as many uses would like to use search.

Q: Are there any best practice algorithms out there we could adopt?

To achieve better results other than a brute force word match we thought of the following "algorithm":

Ranking of results

Results are ranked by the following criteria:

First ranking

Results are ranked higher if keywords appear in one of the following parts parts of a page:

  1. Title
  2. Abstract
  3. Body text
  4. Tags

(Sorted by importance (high to low) articles/features/news and the like)

Second ranking

Keywords that appear in tags will increase the individual ranking of an result.

Frequency of words

A higher frequency will result in a higher ranking of a result.

Cross references

A page that got referenced from other internal pages will be ranked higher.


We also would like to include the following features in our search:

  1. Spell check with suggestions if misspelled
  2. Synonyms for frequently used words
  3. Auto complete search box

Many thanks for all thoughts, replies and links.


  • can you give some examples of what you think some typical search queries would look like, and what sort of pages would be returned? This might help give us a sense of how the data is structured.
    – Jonathan
    Jul 6, 2011 at 23:27
  • This looks like an IA or programming question as opposed to a UX question. Is that what you intended? If not, try asking on Stack Overflow.
    – Rahul
    Jul 10, 2011 at 0:20
  • It may need Date in the algorithm so that articles from 3 years ago don't rank as high as once from 3 days ago.
    – JonW
    Aug 4, 2011 at 8:44

2 Answers 2


You're writing everything correct. Except I think that tags may have more importance, than abstract and body text.

But, if you have a football site, so the users search for football mathes or articles. I think it should be great to separate them.

enter image description here

p.s. Sorry for my poor english, tell me if you've found any mistakes. :)


Just so you know Lucene, Lucene.Net, PyLucene, and Solr (whichever technology suits your needs and language) does exactly this through document boosting, or field boosting. Also IDF (Inverse Document Frequency) almost always largely solves this problem (IE: more specific fields are shorter)

Also keep in mind (in the case of American Football) you would have to deal with things like (these terms matching) Forty-Niners = 49'ers - This is why it's nice to use existing search technologies they help you solve these problems more easily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.