My data looks like this:
[{\"id\" : 1, \"question\" : \"Other specified dermatomycoses\", ... },
{\"id\" : 6, \"question\" : \"Other specified disorders of join
Blakes said it all, as an added tip; you can use $language operator with value none to ignore stop words and stemming. Here is an example how to use it :
db.questions.find({ $text: { $search: "other", $language: "none" } })
This is a commonplace occurance in "text search" operations on many engines, where "stop words" are always omitted from the words that are tokenized and therefore searchable.
Common words are "the", "and", "then" etc. But the full listings can be viewed in the source tree. stop_words_[language].txt
.
English list here
If your intent is to match words such as listed there, then use a $regex search instead:
db.questions.find({ "question": { "$regex": "other" } })
This is not really a MongoDB thing, but it happens with most text search engines, and is "by design".
When creating a text index in MongoDB, if you do not specify a language value it will use english by default and its stop words. If you want to be able to search by the stop words you will have to set the default language value of your text index to "none".
Create your index like this:
db.questions.createIndex({ theSearchField : 'text' }, { default_language: 'none' })
Then you should be able to run your query
db.questions.find({$text:{$search:'other'}}).count()