陈龙
2014-04-24 01:55:21 UTC
for example
document {'id':1,'array':[1,2,3,4,4,4,4]}
use db.test.find({'id':1},{'array':{'$slice':[-1,3]}}) ,but result array
[4],why?
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mongodb-user-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/50cc0ab9-278c-41c3-b523-0e4b238f0b13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
document {'id':1,'array':[1,2,3,4,4,4,4]}
use db.test.find({'id':1},{'array':{'$slice':[-1,3]}}) ,but result array
[4],why?
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to mongodb-user-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/50cc0ab9-278c-41c3-b523-0e4b238f0b13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.