A gem that adds fulltext search capability to Mongoid or MongoMapper documents. The MongoDB aggregation framework is utilized to perform searches quickly and efficiently.
MIT License
5
stars
3
forks
source link
errmsg: 'exception: field inclusion is not allowed inside of $expressions' #2
Model:
class Collection
include MongoMapper::Document
include MongoMapper::FullTextSearch
...
key :details
fulltext_search_in :details
end
irb:
Collection.fulltext_search "wind"
Mongo::OperationFailure: Database command 'aggregate' failed: (errmsg: 'exception: field inclusion is not allowed inside of $expressions'; code: '16420'; ok: '0.0').
$ mongod -version
$ rails -v
Model: class Collection include MongoMapper::Document include MongoMapper::FullTextSearch ... key :details fulltext_search_in :details end
irb: Collection.fulltext_search "wind"
Mongo::OperationFailure: Database command 'aggregate' failed: (errmsg: 'exception: field inclusion is not allowed inside of $expressions'; code: '16420'; ok: '0.0').