At a quick glance it looks tricky, but if you look a bit closer you will notice that it’s returning/projecting user.description which is not part of the index and as a result it will not be covered.
I am not sure, the request is performed on the field “user” (which is in the index), then the sort on the date (second key of the index) then we project only the field “user”… So the description should not impact the request… Or i miss something…
So user is an object that contains a sub-document. If you specify user:1 in a projection, it will include all the fields. In order for the query to covered, you must specify login and/or date because those are the only two sub-fields that are part of the index, description is not. Makes sense?
ohh, I’m dumb. You get so deep into keys and orders you forget the simple things. Got it now.
And yes I meant why is that answer wrong. (I obviously got that wrong). But I get it now. If there was equality on the user.login then the query would have been sort optimized I assume