Solr vs. Sphinx for spatial search
Asked Answered
C

1

8

I'm tasked with choosing the fulltext search engine we're going to be using on an upcoming projects. Based on what I've read, I'm leaning toward Solr, but I'm a little concerned about spatial search. In addition to some other parameters (keywords, category, etc.) we want to be able to specify a location and a maximum distance (e.g., within 25 miles of Tempe, AZ). We'd like to be able to sort the results by distance.

Spatial SOLR is apparently pretty new, and it's not entirely clear what its maturity is. There are also a couple of other options (manually calculating and then inverting the distance, or solr-spatial-light.

My question is basically: is Spatial Solr (or solr-spatial-light) ready enough for primetime to handle the case I described above, or are we better off going with Sphinx?

I'd also be interested in hearing general experiences implementing either of these, particularly with php.

Chapatti answered 12/5, 2010 at 22:4 Comment(1)
Two years later, for the sake of posterity: the Solr 3.x series and its spatial search functionality should be considered quite mature.Livvie
C
5

I'm currently using Spatial Search Plugin (SSP) for Apache Solr in production, which is based on an older implementation of spatial Solr. The new spatial implementation is (as of this writing) available only in trunk (or nightly builds) and currently being implemented. I'm not aware of the current state of this implementation.

While Spatial Plugin has some minor issues and this older code is less flexible than the current implementation, it has the advantage of being easily deployable to an existing stable Solr 1.4 instance. Plus, it's well documented. I'm using it for the exact same use-case you describe without any problems or performance issues.

You will need some geocoder to convert the locations to latitude/longitude coordinates. You can use MaxMind's GeoLite City or any other location database.

I can't comment on Sphinx as I don't use it.

Continuous answered 12/5, 2010 at 22:54 Comment(4)
I think I might go with Solr if for no other reason than because if I ask a question about it on here, I'm likely to get a high-quality answer from you. :)Chapatti
@notJim, haha! That is the beauty of StackOverflow :)Baa
Also using spatial-solr. For my requirements, it is quite powerful!Giro
Two years later, for the sake of posterity: the Solr 3.x series and its spatial search functionality should be considered quite mature.Livvie

© 2022 - 2024 — McMap. All rights reserved.