class Sunspot::Type::LatlonType
The Latlon type encodes geographical coordinates in the native Solr LatLonType.
The data for this type must respond to the `lat` and `lng` methods; you can use Sunspot::Util::Coordinates as a wrapper if your source data does not follow this API.
Location fields can be used with the geospatial DSL
. See the Geospatial section of the README for examples.
Public Instance Methods
indexed_name(name)
click to toggle source
# File lib/sunspot/type.rb, line 369 def indexed_name(name) "#{name}_ll" end
to_indexed(value)
click to toggle source
# File lib/sunspot/type.rb, line 373 def to_indexed(value) "#{value.lat.to_f},#{value.lng.to_f}" end