views:

429

answers:

1

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.

+4  A: 

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.

Yuval F