Skip to content

Commit f69ef6b

Browse files
Merge branch 'exp-698-task-custom-metadata' of github.com:meilisearch/documentation into exp-698-task-custom-metadata
2 parents f61fa7e + aeeb172 commit f69ef6b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

snippets/samples/code_samples_get_documents_1.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ client.index('movies').getDocuments({
1313
```
1414

1515
```python Python
16-
client.index('movies').get_documents({'limit':2, 'filter': 'genres=action'})
16+
client.index('movies').get_documents({
17+
'limit':2, 'filter': 'genres=action',
18+
'sort': ['rating:desc', 'release_date:asc'] # list format
19+
})
1720
```
1821

1922
```php PHP

snippets/samples/code_samples_get_documents_post_1.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ client.index('books').getDocuments({
2323
client.index('books').get_documents({
2424
'limit':3,
2525
'fields': ['title', 'genres', 'rating', 'language'],
26-
'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English'
26+
'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',
27+
'sort': 'rating:desc, title:asc' # comma-separated string format
2728
})
2829
```
2930

0 commit comments

Comments
 (0)