Skip to content

Commit 9deb146

Browse files
increase maxtotalhits callout level to Danger
1 parent ff23c55 commit 9deb146

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

guides/front_end/pagination.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Other solutions, such as [creating a page selector](/guides/front_end/pagination
1515

1616
Whatever UI pattern you choose, there is a limited maximum number of search results Meilisearch will return for any given query. You can use [the `maxTotalHits` index setting](/reference/api/settings#pagination) to configure this, but be aware that higher limits will negatively impact search performance.
1717

18+
<Danger>
19+
Setting `maxTotalHits` to a value higher than the default will negatively impact search performance. Setting `maxTotalHits` to values over `20000` may result in queries taking seconds to complete.
20+
</Danger>
21+
1822
## "Previous" and "Next" buttons
1923

2024
Using "Previous" and "Next" buttons for pagination means that users can easily navigate through results, but don't have the ability to jump to an arbitrary results page. This is Meilisearch's recommended solution when creating paginated interfaces.

reference/api/settings.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,10 @@ For example, if you set `maxTotalHits` to 100, you will not be able to access se
10651065
| :----------------- | :------ | :------------ | :---------------------------------------------------------- |
10661066
| **`maxTotalHits`** | Integer | `1000` | The maximum number of search results Meilisearch can return |
10671067

1068+
<Danger>
1069+
Setting `maxTotalHits` to a value higher than the default will negatively impact search performance. Setting `maxTotalHits` to values over `20000` may result in queries taking seconds to complete.
1070+
</Danger>
1071+
10681072
### Get pagination settings
10691073

10701074
<RouteHighlighter method="GET" path="/indexes/{index_uid}/settings/pagination" />
@@ -1111,9 +1115,9 @@ Partially update the pagination settings for an index.
11111115
| :----------------- | :------ | :------------ | :---------------------------------------------------------- |
11121116
| **`maxTotalHits`** | Integer | `1000` | The maximum number of search results Meilisearch can return |
11131117

1114-
<Warning>
1118+
<Danger>
11151119
Setting `maxTotalHits` to a value higher than the default will negatively impact search performance. Setting `maxTotalHits` to values over `20000` may result in queries taking seconds to complete.
1116-
</Warning>
1120+
</Danger>
11171121

11181122
#### Example
11191123

0 commit comments

Comments
 (0)