iboard/CBA

Mongoid::Errors::InvalidIndex in HomeController#index

Closed this issue · 3 comments

Am getting the following error trying to run the application.

Problem:
Invalid index specification on Blog: [["tags_array", 1]], {}
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.

Valid options are:
background: true|false
drop_dups: true|false
name: 'index_name'
sparse: true|false
unique: true|false
min: 1
max: 1
bits: 26
bucket_size : 1
Valid types are: 1, -1, '2d', 'geoHaystack'

Example:
class Band
include Mongoid::Document
index({ name: 1, label: -1 }, { sparse: true })
index({ location: '2d' }, { background: true })
end

Thank you! I'll try to reproduce and fix this.

Am waiting for your fix...

The project isn't supported anymore