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
Add typescript support for Index and Collection controllers (#531)
## What does this PR do?
Add typescript support for Index and Collection controllers
### Other changes
- Update `collection:update` and `collection:create` methods (new syntax with `mappings` and `settings`)
- Returns `undefined` instead of some useless `{ acknowledged: true }`. Since this was undocumented it's not a breaking change
Copy file name to clipboardExpand all lines: doc/7/controllers/collection/create/index.md
+46-8Lines changed: 46 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,17 +7,22 @@ description: Create a new collection
7
7
8
8
# create
9
9
10
-
Creates a new [collection](/core/2/guides/essentials/store-access-data) in Kuzzle via the persistence engine, in the provided index.
10
+
Creates a new [collection](/core/2/guides/essentials/store-access-data) in the provided index.
11
11
12
12
You can also provide an optional data mapping that allow you to exploit the full capabilities of our
13
-
persistent data storage layer, [ElasticSearch](https://www.elastic.co/elastic-stack) (check here the [mapping capabilities of ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/mapping.html)).
13
+
persistent data storage layer, [ElasticSearch](https://www.elastic.co/elastic-stack) (check here the [mapping capabilities of ElasticSearch](/core/2/guides/essentials/database-mappings/)).
14
14
15
15
This method will only update the mapping if the collection already exists.
16
16
17
+
<SinceBadgeversion="Kuzzle 2.2.0" />
18
+
<SinceBadgeversion="auto-version" />
19
+
20
+
You can also provide Elasticsearch [index settings](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/index-modules.html#index-modules-settings) when creating a new collection.
|`collection`| <pre>string</pre> | Collection name |
29
-
|`mapping`| <pre>object</pre> | Describes the data mapping to associate to the new collection, using Elasticsearch [mapping format](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/mapping.html)|
34
+
|`definition`| <pre>object</pre> | Describes the collection mappings and the ES index settings|
30
35
|`options`| <pre>object</pre> | Query options |
36
+
<SinceBadgeversion="auto-version">
31
37
32
-
### mapping
33
-
34
-
An object representing the data mapping of the collection.
|`queuable`| <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
33
+
|`includeKuzzleMeta`| <pre>boolean</pre><br/>(`true`) | If true, the returned mappings will contain [Kuzzle metadata](/core/2/guides/essentials/document-metadata/)|
Copy file name to clipboardExpand all lines: doc/7/controllers/collection/update/index.md
+51-10Lines changed: 51 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,28 +13,66 @@ You can define the collection [dynamic mapping policy](/core/2/guides/essentials
13
13
14
14
You can define [collection additional metadata](/core/2/guides/essentials/database-mappings#collection-metadata) within the `_meta` root field.
15
15
16
+
<SinceBadgeversion="Kuzzle 2.2.0" />
17
+
<SinceBadgeversion="auto-version" />
18
+
19
+
You can also provide Elasticsearch [index settings](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/index-modules.html#index-modules-settings) when creating a new collection.
0 commit comments