I'll see in other answered question that for enable beta feature of textserch in MongoDb i must activate the option in the config file. My question is where and with which command?
That's because i didn't have that parameter in my mongodb.conf file so i suppose i need to add all the line. Which is the correct syntax from these two?
#textSearchEnabled=true
or
#setParameter=textSearchEnabled=true
it's not important where to place the command?
thanks all
There are several options for enabling the beta text search feature in MongoDB 2.4:
in your MongoDB configuration file with:
setParameter=textSearchEnabled=true
via the command-line when you start mongod
:
mongod --setParameter textSearchEnabled=true
via the mongo
shell:
db.adminCommand( { setParameter: true, textSearchEnabled : true})
Setting via a config file is typically the preferred option, so you don't have to remember to re-enable this when you restart your MongoDB.
In the upcoming MongoDB 2.6 release the text search feature will be enabled by default and the above options will be deprecated (and unnecessary).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With