If you are using the latest version of mongodb, the correct syntax is
db.collection.ensureIndex(
{
subject: "text",
content: "text"
}
)
for indexing multiple text fields in a single collection, and
db.collection.ensureIndex(
{
content: "text"
}
)
for a single field. Try modifying your ensureIndex() call to match one of the above patterns and see if that works for you.
The correct query syntax can be found here: http://docs.mongodb.org/manual/reference/operator/query/text/
db.articles.find( { $text: { $search: "coffee" } } )