Limit the Number of Returned Documents
If the query bar has the Limit option, you can specify the maximum number of documents to return.
Set Documents to Return
To specify the limit:
In the Query Bar, click Options.
Enter an integer representing the number of documents to return into the Limit field.
Click Find to run the query and view the updated results.
click to enlarge
Clear the Query
To clear the query bar and the results of the query, click Reset.
How Does the Compass Query Compare to MongoDB and SQL Queries?
$skip
corresponds to the LIMIT ...
clause
in a SQL SELECT
statement.
Example
You have 3,235 articles. You would like to see a list of the first 10 articles.
- SQL
SELECT * FROM article LIMIT 10; - MongoDB Aggregation
db.article.aggregate( { $limit : 10 } ); - Compass Limit Option
$limit : 10
Learn More
See the limit
entry in the
MongoDB Manual.