I\'m looking into adding full text search to a Meteor app. I know MongoDB now supports this feature, but I have a few questions about the implementation:
To create a text index and try to add like this I hope so it will be useful if there is still problem comment
From docs.mongodb.org:
Append scalar index fields to a text index, as in the following example which specifies an ascending index key on username:
db.collection.ensureIndex( { comments: "text", username: 1 } )
Warning You cannot include multi-key index field or geospatial index field.
Use the project option in the text to return only the fields in the index, as in the following:
db.quotes.runCommand( "text", { search: "tomorrow", project: { username: 1, _id: 0 } } )
Note: By default, the _id field is included in the result set. Since the example index did not include the _id field, you must explicitly exclude the field in the project document.