retire icon indicating copy to clipboard operation
retire copied to clipboard

Add proper DSL for geo filtering

Open karmi opened this issue 13 years ago • 0 comments

While the geo filtering is currently possible to do with Tire, it would be nice to have a more convenient DSL support for geo features:

Tire.search('venues') do
  query  { all }
  geo    { distance :location, '200km', [40, -71] }
end

Tire.search('venues') do
  query  { all }
  geo    { polygon :location, [40, -70], [30, -80], [20, -90] }
end

Tire.search('venues') do
  query  { all }
  geo    { bounding_box :location, :top_left => [40, -70], :bottom_right => [30, -80] }
end

karmi avatar Mar 20 '12 21:03 karmi