Sha256: 3571db93fed51840266081c6930e901a9afc5b9ebd680e8ecac47d7027fee9ea
Contents?: true
Size: 658 Bytes
Versions: 6
Compression:
Stored size: 658 Bytes
Contents
module Sunspot module Query # # This query component generates parameters for LocalSolr geo-radial # searches. The LocalSolr API is fairly rigid, so the Local component # doesn't have any options - it just takes coordinates and a radius, and # generates the appropriate parameters. # class Local #:nodoc: def initialize(coordinates, radius) @coordinates, @radius = Util::Coordinates.new(coordinates), radius end def to_params { :qt => 'geo', :lat => @coordinates.lat, :long => @coordinates.lng, :radius => @radius } end end end end
Version data entries
6 entries across 6 versions & 3 rubygems