Skip to content

Commit 1e6fe28

Browse files
committed
wip
1 parent 6f5570f commit 1e6fe28

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,19 @@ Example:
10321032

10331033
In this scenario, in the `clothes` index, we want the price to be sorted in an ascending way. For this formula to be valid, `price` must be added to the `sortableAttributes` settings of the `clothes` index.
10341034

1035+
#### Sort by multiple attributes
1036+
When sorting by mutiple fields sort formula is expressed like this: `index:attribute:order,attribute2:order`.
1037+
1038+
Example:
1039+
```js
1040+
[
1041+
{ label: 'Sort By Price And Title', value: 'clothes:price:asc,title:asc' }
1042+
]
1043+
```
1044+
1045+
⚠️ Attributes with comma in their name are not allowed.
1046+
1047+
10351048
#### Relevancy
10361049

10371050
The impact sorting has on the returned hits is determined by the [`ranking-rules`](https://docs.meilisearch.com/learn/core_concepts/relevancy.html#ranking-rules) ordered list of each index. The `sort` ranking-rule position in the list makes sorting documents more or less important than other rules. If you want to change the sort impact on the relevancy, it is possible to change it in the [ranking-rule setting](https://docs.meilisearch.com/learn/core_concepts/relevancy.html#relevancy). For example, to favor exhaustivity over relevancy.

0 commit comments

Comments
 (0)