Can I do a MongoDB “starts with” query on an indexed subdocument field?
When you disable table scans, it means that any query where a table scan “wins” in the query optimizer will fail to run. You haven’t posted an explain but it’s reasonable to assume that’s what is happening here based on the error. Try hinting the index explicitly: db.articles.find({“source.homeUrl” : { $regex : /^http/ }}).hint({“source.homeUrl” : … Read more