I solved it. I misunderstood it, I thought the values in the column would be sorted, thank you
How to use Mongoose's sort() function in cosmos DB?
const user = await User.find({ level: 'user' }).sort({ class: 'asc' }).select({ password: 0 })
errmsg:'Error=2, Details=\'Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: f9fb7d60-da8b-4697-b77b-7a83218014e8; Reason: (Message: {"Errors":["The index path corresponding to the specified order-by item is excluded."]}\r\nActivityId: f9fb7d60-da8b-4697-b77b-7a83218014e8, Request URI: /apps/ a977c348-dbcb-43ee-8b19-4bb37642d953/services/c8407aa2-c5f4-4218-9966-268d2677b66f/partitions/006a36db-fe6b-476c-9950-0878ff6c5fe3/replicas/132464217036121510s/, RequestStats: Please see CosmosDiagnostics, SDK: Windows/10.0 .14393 cosmos-netstandard-sdk/3.3.2);',
code: 2,
codeName:'BadValue',
name:'MongoError',
I got this error