Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/7/controllers/document/search/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ That limit is by default set at 10000 documents, and you can't get over it even
When processing a large number of documents (i.e. more than 1000), it is advised to paginate the results using [SearchResult.next](/sdk/js/7/core-classes/search-result/next) rather than increasing the size parameter.
:::

::: warning
When using a cursor with the `scroll` option, Elasticsearch has to duplicate the transaction log to keep the same result during the entire scroll session.
It can lead to memory leaks if a scroll duration too great is provided, or if too many scroll sessions are open simultaneously.
:::

::: info
<SinceBadge version="Kuzzle 2.2.0"/>
You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key and the maximum number of simultaneously opened scroll sessions under the `services.storage.maxScroll` configuration key.
:::


<br/>

```js
Expand Down
2 changes: 1 addition & 1 deletion doc/7/core-classes/kuzzle-error/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ order: 0

Inherits from the standard `Error` class.

The KuzzleError class represents an [error response from Kuzzle API](/core/2/api/essentials/errors).
The KuzzleError class represents an [error response from Kuzzle API](/core/2/api/essentials/error-handling).
10 changes: 10 additions & 0 deletions doc/7/core-classes/search-result/next/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ For that reason, this method is guaranteed to return consistent results, even if

This is the most consistent way to paginate results, however, this comes at a higher computing cost for the server.

::: warning
When using a cursor with the `scroll` option, Elasticsearch has to duplicate the transaction log to keep the same result during the entire scroll session.
It can lead to memory leaks if ascroll duration too great is provided, or if too many scroll sessions are open simultaneously.
:::

::: info
<SinceBadge version="Kuzzle 2.2.0"/>
You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key and the maximum number of simultaneously opened scroll sessions under the `services.storage.maxScroll` configuration key.
:::

<<< ./snippets/scroll.js

### Strategy: sort / size
Expand Down
2 changes: 1 addition & 1 deletion doc/7/essentials/error-handling/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All SDK methods return a promise, that can be rejected with a `KuzzleError` valu
| `status` | <pre>number</pre> | Status following [HTTP Standards](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) |
| `stack` | <pre>string</pre> | Error stacktrace (Only in development mode) |

You can find a detailed list of possible errors messages and statuses in the [documentation API](/core/2/api/essentials/errors).
You can find a detailed list of possible errors messages and statuses in the [documentation API](/core/2/api/essentials/error-codes/core).

#### Example with a promise chain

Expand Down