You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
666: Add support for sort in documents api r=curquiza a=kashifsoofi
# Pull Request
## Related issue
Fixes#665
## What does this PR do?
- Add Sort to DocumentsQuery
## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?
Thank you so much for contributing to Meilisearch!
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Added support for sorting document query results, including multi-field ordering and ID-based sorts; works with filters and limits.
* **Documentation**
* Added "Search with sort" guidance and a C# example showing how to specify sort options.
* **Tests**
* Added tests validating ascending/descending, multi-field sort with filters, and that sort parameters appear in query strings.
* **Chores**
* Bumped Meilisearch version used in CI from v1.10.0 to v1.16.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Kashif Soofi <kashif.soofi+git@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,6 +260,17 @@ if (results is PaginatedSearchResult<T> paginatedResults)
260
260
}
261
261
```
262
262
263
+
#### Search with sort
264
+
265
+
To get results sorted by attributes and preferred sorting order, the [Sort](https://www.meilisearch.com/docs/reference/api/search#sort) property must be defined.
This package guarantees compatibility with [version v1.x of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-dotnet/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info.
0 commit comments