Reputation: 23
I am trying to get the largest document of a specific collection. So far I am only able to get the document size of a selected document(reading the documentSize attribute in the response header) but I am unable to filter all the documents by size.
Any response would be appreciated :)
Upvotes: 2
Views: 560
Reputation: 136226
but I am unable to filter all the documents by size
Unfortunately it is not possible to query for documents by their size as there's no system property which will tell you the size of the document. You will need to query all documents and compute the size of each document individually.
Upvotes: 3