Closed johnnywiller closed 6 years ago
fyi, yes RESTHeart has a default sorting, see https://restheart.org/learn/query-documents/#default-sorting
The default sorting of the documents is by the _id descending. To disable default sorting just add the sort={} query parameter
Expected Behavior
Return the documents correctly
Current Behavior
500 server error Sort exceeded memory limit of 104857600 bytes.
Context
Hello, I'm been faced with a server error displaying
Sort exceeded memory limit of 104857600 bytes
.I know this error happens when we try to sort a large volume of docs, but I'm currently not using any sort operation. In fact I'm querying a view. If I query the collection (the one the view is based), no error happens.
GET localhost:8080/db/collection
works fineGET localhost:8080/db/view
limit exceedNo sort operation is done in the aggregation pipeline of the view, the resulted amounted of docs returned by the mongo client is less in the view than the collection.
Does RH use any default sorting in the view, or have any different behavior based on views?