The first parameter is specifying the shape of the compound index. First, by sorting embedded fielduser.login in ascending (1) order, and then by sorting user.date in descending (-1) order within the context of user.login. The field order and the direction ( 1 or -1) of sort is important in a compound index.