Limitation
Note the important limitation on sort, limit and offset described above.
Using the .limit elements, you can limit the number of records that will be displayed by your query.
// Find all the jars in artifactory and sort them by repo and name, but only display the first 100 results items.find({"name" : {"$match":"*.jar"}).sort({"$asc" : ["repo","name"]}).limit(100)
You can also implement pagination when you want to focus on a subset of your results using the .offset element.
//Run the same example, but this time, display up to 50 items but skipping the first 100 items.find({"name" : {"$match":"*.jar"}).sort({"$asc" : ["repo","name"]}).offset(100).limit(50)