Reputation: 23
In Mongo shell I use:
db.org_all.find({$text:{$search:"school"}}).limit(1000)
How to use .limit()
in RESTHeart API?
/publicdb/org_all?find={$text:{$search:"school"}}&limit=10
doesn’t work.
Upvotes: 2
Views: 1147
Reputation: 1253
In RESTHeart you specify the page and pagesize query parameters.
In your case, you need to specify pagesize=10 (not limit) the request should be:
GET /publicdb/org_all?filter={"$text":{"$search":"school"}}&pagesize=10
You'll find more information on restheart documentation query documents section, including the query parameters filter, page, pagesize and keys (projections)
Upvotes: 3