views:

47

answers:

1

I'm writing an ASP.NET MVC site where I plan to use Lucene.Net for searching. Some of my site content has a location attribute, and I'm thinking of incorporating location into the searching functionality.

Does functionality exist in Lucene where, if I were to define latitude and longitude fields for my documents, the user inputs some coordinates and the system returns the closest hits to those coordinates? If so, could you point me to some samples on how to use those features?

+2  A: 

There is a project in contrib called Spatial.Net. Lucene in Action has a sample implementation, but looking at the test file (TestCartesian.cs) is probably just as good. Technical documentation can be found here.

Xodarap