Filtering, Sorting, and Pagination
Filtering allows for the selective return of documents based on document or source property values. Documents can be filtered by a property defined at either the collection or the collection alias endpoints in the blueprint. Documents can be filtered in several ways, including equality and range comparisons and subset and superset comparisons in the case of array properties.
Learn about filtering in the Using filtering chapter.
Datastore maintains a default sort order when not specified; however, collection requests can sort the returned documents by document or source properties. Those properties can be instructed to sort the result in ascending or descending order.
Undefined (null) values are sorted first in ascending order and last in descending.
Learn about sorting in the Using sorting chapter.
The number of documents returned from a collection request at once can be achieved by passing a page limit with the request. Pagination is applied after sorting and filtering the documents. The next and previous pages can be accessed by a token, allowing for retrieving either the next or previous pages in subsequent requests.
Learn about pagination in the Using pagination chapter.