Although the limit of 1000 objects has been removed from the selection, you still need to provide an explicit upper bound. Of course, if you make it big enough, you will get all of your entities.
The iterator approach proposed above is functionally equivalent (if the limit passed to the sample is large enough to get all entities). However, they have different performance characteristics. In particular, an iterator retrieves nodes with a small number of objects at a time. If you have a large number of objects, then the version using the iterator will do many more RPCs.
source share