E
E
Evgeny Kumanin2017-08-15 09:35:48
MongoDB
Evgeny Kumanin, 2017-08-15 09:35:48

MongoDB 2.6.11 .skip() does not work correctly. Have you encountered such behavior?

I did not find information about this behavior of mongi.
On 3.2.0, this problem is not observed.
Essence:
3.2.0

> db.somecollectionname.count()
1696744

> db.somecollectionname.find().skip(1696743).limit(10)
// ...
// как и положено выдает 1 запись

------------------
2.6.11
> db.somecollectionname.count()
771018

> db.somecollectionname.find().skip(771018).limit(10)
// ...
// выдает 10 записей

The question is that I can not find in which release this bug was fixed? Upgrade to 3.2 and not suffer?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2017-08-15
@jackkum

Try to add sorting by index, for example by _id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question