Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple spacial not working. #35

Open
paterson opened this issue May 14, 2013 · 4 comments
Open

Simple spacial not working. #35

paterson opened this issue May 14, 2013 · 4 comments
Assignees

Comments

@paterson
Copy link

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? :)

@arthurnn
Copy link
Collaborator

which version of mongoid are you using?

@ghost ghost assigned arthurnn May 17, 2013
@ausangshukla
Copy link

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

@mkalygin
Copy link

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

@pSenthil202
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants