Skip to content

Commit 8b7ee47

Browse files
authored
Merge pull request #499 from kuzzleio/7.1.2-proposal
# [7.1.2](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.1.2) (2020-03-31) #### Bug fixes - [ [#498](#498) ] Hotfix document search http ([Aschen](https://github.com/Aschen)) #### Enhancements - [ [#496](#496) ] Exposes SearchResult classes ([Aschen](https://github.com/Aschen)) ---
2 parents 696d418 + c7d1041 commit 8b7ee47

File tree

10 files changed

+155
-100
lines changed

10 files changed

+155
-100
lines changed

doc/7/controllers/document/search/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ That limit is by default set at 10000 documents, and you can't get over it even
1616
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.
1717
:::
1818

19+
::: warning
20+
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.
21+
It can lead to memory leaks if a scroll duration too great is provided, or if too many scroll sessions are open simultaneously.
22+
:::
23+
24+
::: info
25+
<SinceBadge version="Kuzzle 2.2.0"/>
26+
You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key.
27+
:::
28+
29+
1930
<br/>
2031

2132
```js

doc/7/core-classes/search-result/next/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ For that reason, this method is guaranteed to return consistent results, even if
4040

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

43+
::: warning
44+
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.
45+
It can lead to memory leaks if ascroll duration too great is provided, or if too many scroll sessions are open simultaneously.
46+
:::
47+
48+
::: info
49+
<SinceBadge version="Kuzzle 2.2.0"/>
50+
You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key.
51+
:::
52+
4353
<<< ./snippets/scroll.js
4454

4555
### Strategy: sort / size

index.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
const
2-
Kuzzle = require('./src/Kuzzle'),
3-
{
4-
Http,
5-
WebSocket
6-
} = require('./src/protocols'),
7-
BaseController = require('./src/controllers/base'),
8-
KuzzleAbstractProtocol = require('./src/protocols/abstract/common'),
9-
KuzzleEventEmitter = require('./src/eventEmitter');
1+
const Kuzzle = require('./src/Kuzzle');
2+
const { Http, WebSocket } = require('./src/protocols');
3+
const BaseController = require('./src/controllers/base');
4+
const KuzzleAbstractProtocol = require('./src/protocols/abstract/common');
5+
const KuzzleEventEmitter = require('./src/eventEmitter');
6+
const {
7+
SearchResultBase,
8+
DocumentSearchResult,
9+
ProfileSearchResult,
10+
RoleSearchResult,
11+
SpecificationSearchResult,
12+
UserSearchResult
13+
} = require('./src/controllers/searchResult');
1014

1115
if (typeof window !== 'undefined' && typeof BUILT === 'undefined') {
1216
throw new Error('It looks like you are using the Nodejs version of Kuzzle SDK ' +
@@ -21,5 +25,11 @@ module.exports = {
2125
WebSocket,
2226
BaseController,
2327
KuzzleAbstractProtocol,
24-
KuzzleEventEmitter
28+
KuzzleEventEmitter,
29+
SearchResultBase,
30+
DocumentSearchResult,
31+
ProfileSearchResult,
32+
RoleSearchResult,
33+
SpecificationSearchResult,
34+
UserSearchResult
2535
};

0 commit comments

Comments
 (0)