You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't seem to work and as soon as I add a search_in :name to my models it shows this error
message:
Invalid index specification on Product: _keywords, {:background=>true}
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
database: 'database_name'
drop_dups: true|false
name: 'index_name'
sparse: true|false
unique: true|false
min: 1
max: 1
bits: 26
bucket_size : 1
weights: { content: 1, title: 2 }
expire_after_seconds: number_of_seconds
Valid types are: 1, -1, '2d', '2dsphere', 'geoHaystack', 'text', 'hashed'
Example:
class Band
include Mongoid::Document
index({ name: 1, label: -1 }, { sparse: true })
index({ location: '2d' }, { background: true })
end
It doesn't seem to work and as soon as I add a
search_in :name
to my models it shows this errorMy model looks like so
Is there a bug or am I doing something wrong ?
The text was updated successfully, but these errors were encountered: