mongoid_spacial icon indicating copy to clipboard operation
mongoid_spacial copied to clipboard

Simple spacial not working.

Open paterson opened this issue 11 years ago • 4 comments

I've code like this:

field :geo, type: Array, spacial: true
spacial_index :geo

I've run rake db:mongoid:create_indexes and I keep getting :

Problem:
    Invalid index specification on CarPark: [[:geo, "2d"]], {}
Summary:
    Indexes in Mongoid are defined as a hash of field name and direction/2d pairs, with a hash for any additional options.
Resolution:
    Ensure that the index conforms to the correct syntax and has the correct options.

More here...

I'm sure I'm missing something really simple, what is it? :)

paterson avatar May 14 '13 21:05 paterson

which version of mongoid are you using?

arthurnn avatar May 17 '13 18:05 arthurnn

I have the exact same issues. I'm using mongoid 3.1.4. Any help is much appreciated

ausangshukla avatar Jul 20 '13 17:07 ausangshukla

Same problem here. I'm using mongoid 3.1.4. Any clues?

mkalygin avatar Oct 15 '13 17:10 mkalygin

Any solution for this issue , I am facing same mongoid (4.0.0) ?

Mongoid::Errors::InvalidIndex:

Problem: Invalid index specification on River: [[:source, "2d"]], {}

Summary: Indexes in Mongoid are defined as a hash of field name and direction/2d pairs, with a hash for any additional options.

Resolution: Ensure that the index conforms to the correct syntax and has the correct options.

pSenthil202 avatar Jan 17 '15 15:01 pSenthil202