This may be a novice question but could it be possible query here.
If I have a compound Index as
{ a: 1, b: 1, c: 1, d: 1 }
Is this query possible?
db.data.find( { a: {$gte:1,$lt:2}, b: { $gt: 3} },c:"test",d:"yes" ).sort( { b: 1 } )
I mean can I use sorting on field b with this compound index and the specified query or do I need to create a separate index on b?