Use the MongoDB Search objectId field type to index ObjectId values. After you index a field as objectId, you can query it using the equals and in operators.
objectId
문서