You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/7/controllers/document/search/index.md
+31-14Lines changed: 31 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,28 +12,21 @@ Searches documents.
12
12
There is a limit to how many documents can be returned by a single search query.
13
13
That limit is by default set at 10000 documents, and you can't get over it even with the from and size pagination options.
14
14
15
+
Once a `SearchResult` has been retrieved, navigation through pages can be done with the [SearchResult.next](/sdk/js/7/core-classes/search-result/next) method.
16
+
15
17
:::info
16
18
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.
17
19
:::
18
20
19
21
::: 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
-
<SinceBadgeversion="Kuzzle 2.2.0"/>
26
-
You can restrict the scroll session maximum duration under the `services.storage.maxScrollDuration` configuration key.
22
+
When using a cursor with the `scroll` option, Elasticsearch duplicates the transaction log to keep the same result during the entire scroll session.
23
+
It can lead to memory leaks if a scroll duration too great is provided, or if too many scroll sessions are open simultaneously.
27
24
:::
28
25
29
26
<SinceBadgeversion="7.4.8"/>
30
27
31
-
This method also supports the [Koncorde Filters DSL](/core/2/api/koncorde-filters-syntax) to match documents by passing the `lang` argument with the value `koncorde`.
32
-
Koncorde filters will be translated into an Elasticsearch query.
33
-
34
-
::: warning
35
-
Koncorde `bool` operator and `regexp` clause are not supported for search queries.
36
-
:::
28
+
This method also supports the [Koncorde Filters DSL](/core/2/api/koncorde-filters-syntax) to match documents by passing the `lang` argument with the value `koncorde`.
29
+
Koncorde filters will be translated into an Elasticsearch query.
37
30
38
31
<br/>
39
32
@@ -79,14 +72,38 @@ An empty body matches all documents in the queried collection.
79
72
80
73
## Resolves
81
74
82
-
Resolves to a [SearchResult](/sdk/js/7/core-classes/search-result) object.
75
+
Resolves to a [SearchResult](/sdk/js/7/core-classes/search-result/properties) object.
83
76
84
77
## Usage
85
78
86
79
With the [ElasticSearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/query-dsl.html) syntax.
87
80
81
+
<details><summary>Show snippet</summary>
82
+
88
83
<<< ./snippets/search-es.js
89
84
85
+
</details>
86
+
90
87
With the [Koncorde Filters DSL](/core/2/api/koncorde-filters-syntax) syntax.
91
88
89
+
<details><summary>Show snippet</summary>
90
+
92
91
<<< ./snippets/search-koncorde.js
92
+
93
+
</details>
94
+
95
+
Pagination with [SearchResult.next](/sdk/js/7/core-classes/search-result/next)
96
+
97
+
<details><summary>Show snippet</summary>
98
+
99
+
```js
100
+
let result =awaitsdk.document.search('nyc-open-data', 'yellow-taxi', {}, { scroll:'2s' });
Copy file name to clipboardExpand all lines: doc/7/essentials/realtime-application/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ They are automatically connected to the realtime engine, and their content (`_so
29
29
30
30
You can therefor directly use them as props for your frontend components for example.
31
31
32
-
::: warn
32
+
::: warning
33
33
There is a limit on how many realtime documents a single observer instance can manage. This limit is set by collection and by default it's 100 documents per collection. You can increase this limit in Kuzzle configuration under the `limits.subscriptionConditionsCount` key.
0 commit comments