-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Steps to reproduce:
class Venue
field :coordinates, type: Array
index(
,
{min: -180, max: 180})
end
Have ran rake db:mongoid:create_indexes
Tried calling:
Venue.geo_near([@lat, @long])
And got:
Moped::Errors::OperationFailure:
The operation: #<Moped::Protocol::Command
@length=135
@request_id=3
@response_to=0
@op_code=2004
@flags=[]
@full_collection_name="encore_backend_test.$cmd"
@skip=0
@limit=-1
@selector={:geoNear=>"venues", :near=>[43.670906, -79.393331], :query=>{}, :spherical=>true}
@fields=nil>
failed with error "no geo index "
Any suggestions?