-
Type:
Improvement
-
Resolution: Gone away
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
Environment:All
-
Query Optimization
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
Would be nice to be able to get from an array all items after a given index, without knowing the length of the array. For example:
{ _id :1,
foo: [1, 2, 3, 4, 5]
}
> db.test.find( {}, { foo:
{ $slice: [1, $end] } } )
>
Currently, it seems you can only do this by:
1. Knowing what the length is and doing this: db.test.find( {}, { foo:
} )
2. Using JavaScript in the query
3. Picking an arbitrarily high number to use as the limiter: db.test.find( {}, { foo:
} )