title: Ranking using Geographic Location in Solr
body: <p>What is the correct way to implement a custom ranking algorithm for Solr/Lucene?</p>
  
  <p>I read about Zvents implementing a Distance Weighting ranking system for documents which correspond to events in a specific geographic area (<a href="http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Zvents" rel="nofollow noreferrer">http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Zvents</a>).</p>
  
  <p>I would like to do something similar: I index ads in different cities and I would like to boost the relevance of nearest ads given a specific location.</p>