Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose limit results

const results = await Model.find({}, '', {
   sort: {
      score: -1
   },
   limit: 10
})
 
PREVIOUS NEXT
Tagged: #mongoose #limit #results
ADD COMMENT
Topic
Name
2+5 =