LambdaDB allows you to add one or more sorts on specific fields. Each sort can be reversed as well. The sort is defined on a per field level.Documentation Index
Fetch the complete documentation index at: https://docs.lambdadb.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sorting can be done on the following data types:
longdoubledatetimekeyword
Parameters
| Parameter | Description | Type | Required | Values |
|---|---|---|---|---|
| field | Field name to sort by | string | ✓ | - |
| order | Sort order direction | string | asc, desc |
Sort order options
| Value | Description |
|---|---|
| asc | Sorts in ascending order |
| desc | Sorts in descending order |
Usage
The sort parameter accepts an array of sort objects, allowing multiple field sorting with different orders.Examples
Single field sort
Sort by timestamp in descending order (newest first):Multiple field sort
Sort by priority (descending) first, then by created_at (ascending):When multiple sort fields are specified, the sorting is applied in the order they appear in the array. Documents are first sorted by the first field, then by the second field for documents with the same first field value, and so on.