Thursday, February 10, 2011

Ranking using Geographic Location in Solr

What is the correct way to implement a custom ranking algorithm for Solr/Lucene?

I read about Zvents implementing a Distance Weighting ranking system for documents which correspond to events in a specific geographic area (http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Zvents).

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.

  • Hi Enrico. Local Lucene is a project meant to add local search to Lucene. Basically, you add spatial coordinates to the index fields. You then have to decide, based on your index structure, whether it is better to first search according to textual matches and then filter by geographic location, or the other way around. Lucene in Action has an example of a spatial result filter. The forthcoming second edition will probably have more in that direction. See also the LocalSolr wiki page.

    From Yuval F

0 comments:

Post a Comment