4 ms·
It's less the match, and more what is returned by Mongo. If he matches comments.name, he wants the comments.text to go with it, not the entire document. It bec
by dbcfd 15y ago
It's less the match, and more what is returned by Mongo. If he matches comments.name, he wants the comments.text to go with it, not the entire document.
It becomes an issue when you have extremely large arrays in the document (e.g. thousands of comments).
- embwbam 15y agoExactly, I just updated the post with examples of why slice and elemMatch don't work.