The simplest way to do what you’re asking would be to use a well-considered compound index. This article from MongoDB explains it pretty well:
Compound indexes are indexes composed of several different fields. For example, instead of having one index on “Last name” and another on “First name”, it is typically most efficient to create an index that includes both “Last name” and “First name” if you query against both of the names. Our compound index can still be used to filter queries that specify the last name only.
You can learn more about compound index creation from the MongoDB website and, if you enjoy books, Shannon Bradshaw goes into greater detail on this and other performance-related subjects.