Search code examples
solrgeolocation

using miles rather than kilometers in solr spatial searches


When using solr's spatial search feature, how can I tell it to use miles rather than km when calculating values.

http://wiki.apache.org/solr/SpatialSearch


Solution

  • The javadoc of the class that implements geofilt says "All units are in Kilometers"

    It was decided that configurable units would only complicate things.

    Which means that it's up to you to do the conversions (it's trivial code really).