views:

650

answers:

1

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.

+2  A: 

I'm currently using JTeam's spatial solr plugin 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 JTeam's 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.

Mauricio Scheffer
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. :)
notJim
@notJim, haha! That is the beauty of StackOverflow :)
Bill Paetzke
Also using spatial-solr. For my requirements, it is quite powerful!
Yurish