Skip to content

Commit a5d1614

Browse files
committed
Improve documentation
1 parent 4f4b7ff commit a5d1614

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,18 @@ When placeholder search is set to `false`, no results appears when searching on
112112

113113
### Pagination total hits
114114

115-
The total (and finite) number of hits you can browse during pagination when using the [pagination widget](https://www.algolia.com/doc/api-reference/widgets/pagination/js/) or the [`infiniteHits` widget](#-infinitehits). If none of these widgets are used, `paginationTotalHits` is ignored.<br>
115+
The total (and finite) number of hits (default: `200`) you can browse during pagination when using the [pagination widget](https://www.algolia.com/doc/api-reference/widgets/pagination/js/) or the [`infiniteHits` widget](#-infinitehits). If none of these widgets are used, `paginationTotalHits` is ignored.<br>
116116

117-
`paginationTotalHits` has a default value of `200`.
117+
For example, using the `infiniteHits` widget, and a `paginationTotalHits` of 9. On the first search request 6 hits are shown, by clicking a second time on `load more` only 3 more hits are added. This is because `paginationTotalHits` is `9`.
118118

119-
The pagination makes the following request on every page change `(hitsPerPage + 1) * (page + 1)`
120-
121-
Example:
119+
Usage:
122120

123121
```js
124122
{ paginationTotalHits: 50 } // default: 200
125123
```
126124

127125
`hitsPerPage` has a value of `6` by default and can [be customized](#-hitsperpage).
128126

129-
130-
131127
### Finite Pagination
132128

133129
Finite pagination is used when you want to add a numbered pagination at the bottom of your hits (for example: `< << 1, 2, 3 > >>`).
@@ -140,7 +136,7 @@ Example:
140136
{ finitePagination: true } // default: false
141137
```
142138

143-
⚠️ Meilisearch is not designed for pagination and this can lead to performances issues, so the usage `finitePagination` but also of the pagination widgets are not recommended..<br>
139+
⚠️ Meilisearch is not designed for pagination and this can lead to performances issues, so the usage `finitePagination` but also of the pagination widgets are not recommended.<br>
144140
More information about Meilisearch and the pagination [here](https://github.com/meilisearch/documentation/issues/561).
145141

146142
### Primary key

0 commit comments

Comments
 (0)