I\'ve created the following index on my collection:
db.myCollection.createIndex({
user_id: 1,
name: \'text\'
})
If I try to see the exe
This behavior is due to text indexes being sparse by default:
For a compound index that includes a text index key along with keys of other types, only the text index field determines whether the index references a document. The other keys do not determine whether the index references the documents or not.
The query filter is not referencing the text index field, so the query planner won't consider this index as it can't be certain that the full result set of documents will be returned by the index.