Question

I am trying to implement a geospatial search in the latest version on Lucene.NET (3.0.3).

I have installed Lucene.Net (3.0.3), Lucene.Net Contrib (3.0.3) and Lucene.Net Contrib Spacial (3.0.3).

I was using this excellent example to get a simple spacial search working.

http://www.leapinggorilla.com/blog/Read/1010/spatial-search-in-lucenenet---worked-example

It includes the following line:

IProjector projector = new SinusoidalProjector();
var ctp = new CartesianTierPlotter(0, projector, Fields.LocationTierPrefix);

The classes / interfaces IProjector, SinusoidalProjector and CartesianTierPlotter cannot be found.

From the docs they look like they should be located here.

Lucene.Net.Spatial.Tier

However this entire namespace is missing.

Can some one examplain how to get the above example working in the latest version of lucene and how the api has changed regarding these classes in the latest release?

Was it helpful?

Solution

I joined the lucene.net mailing list and put the question over to the experts. I've included the response from Itamar Syn-Hershko below.

Yes, Lucene.NET 3.0.3 is using a different spatial search module, based on spatial4n / spatial4j

I will have a blog post up soon to describe how to work. Here's some write up I did a while ago on that: http://code972.com/blog/2012/05/51-the-future-of-geo-spatial-searches-with-lucene,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top