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
13 changes: 7 additions & 6 deletions doc/7/controllers/document/create-or-replace/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ createOrReplace(index, collection, id, document, [options]);
```

| Argument | Type | Description |
| ------------ | ----------------- | ---------------- |
|--------------|-------------------|------------------|
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| `id` | <pre>string</pre> | Document ID |
Expand All @@ -29,17 +29,18 @@ createOrReplace(index, collection, id, document, [options]);

Additional query options

| Options | Type<br/>(default) | Description |
| ---------- | ------------------------------- | ---------------------------------------------------------------------------------- |
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| Options | Type<br/>(default) | Description |
|------------|----------------------------------|------------------------------------------------------------------------------------------|
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| `silent` | <pre>boolean</pre><br/>(`false`) | If `true`, then Kuzzle will not generate notifications <SinceBadge version="change-me"/> |

## Resolves

Resolves to an object containing the document creation result.

| Name | Type | Description |
| --------- | ----------------- | ---------------------------------------------------------- |
|-----------|-------------------|------------------------------------------------------------|
| \_id | <pre>string</pre> | The id of the newly created document |
| \_version | <pre>number</pre> | The version of the document in the persistent data storage |
| \_source | <pre>object</pre> | The created document |
Expand Down
15 changes: 8 additions & 7 deletions doc/7/controllers/document/create/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ create(index, collection, document, [id], [options]);
```

| Argument | Type | Description |
| ------------ | ----------------- | -------------------- |
|--------------|-------------------|----------------------|
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| `document` | <pre>object</pre> | Document content |
Expand All @@ -31,17 +31,18 @@ create(index, collection, document, [id], [options]);

Additional query options

| Options | Type<br/>(default) | Description |
| ---------- | ------------------------------- | ---------------------------------------------------------------------------------- |
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| Options | Type<br/>(default) | Description |
|------------|----------------------------------|------------------------------------------------------------------------------------------|
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| `silent` | <pre>boolean</pre><br/>(`false`) | If `true`, then Kuzzle will not generate notifications <SinceBadge version="change-me"/> |

## Resolves

Resolves to an object containing the document creation result.

| Name | Type | Description |
| --------- | ----------------- | ------------------------------------------------------ |
| Name | Type | Description |
|------------|-------------------|--------------------------------------------------------|
| `_id` | <pre>string</pre> | ID of the newly created document |
| `_version` | <pre>number</pre> | Version of the document in the persistent data storage |
| `_source` | <pre>object</pre> | Created document |
Expand Down
15 changes: 8 additions & 7 deletions doc/7/controllers/document/delete-by-query/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ deleteByQuery(index, collection, [query], [options]);
```

| Argument | Type | Description |
| ------------ | ----------------- | --------------- |
|--------------|-------------------|-----------------|
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| `query` | <pre>object</pre> | Query to match |
Expand All @@ -39,12 +39,13 @@ deleteByQuery(index, collection, [query], [options]);

Additional query options

| Options | Type<br/>(default) | Description |
| ---------- | ------------------------------- | ---------------------------------------------------------------------------------- |
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| `source` | <pre>boolean</pre> | if set to `true` Kuzzle will return each deleted document body in the response |
| `lang` | <pre>string</pre> | Specify the query language to use. By default, it's `elasticsearch` but `koncorde` can also be used. <SinceBadge version="7.4.8"/> |
| Options | Type<br/>(default) | Description |
|------------|----------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| `lang` | <pre>string</pre> | Specify the query language to use. By default, it's `elasticsearch` but `koncorde` can also be used. <SinceBadge version="7.4.8"/> |
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| `silent` | <pre>boolean</pre><br/>(`false`) | If `true`, then Kuzzle will not generate notifications <SinceBadge version="change-me"/> |
| `source` | <pre>boolean</pre> | if set to `true` Kuzzle will return each deleted document body in the response |

## Resolves

Expand Down
11 changes: 6 additions & 5 deletions doc/7/controllers/document/delete/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ delete (index, collection, id, [options]);
```

| Argument | Type | Description |
| ------------ | ----------------- | --------------- |
|--------------|-------------------|-----------------|
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| `id` | <pre>string</pre> | Document ID |
Expand All @@ -28,10 +28,11 @@ delete (index, collection, id, [options]);

Additional query options

| Options | Type<br/>(default) | Description |
| ---------- | ------------------------------- | ---------------------------------------------------------------------------------- |
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| Options | Type<br/>(default) | Description |
|------------|----------------------------------|------------------------------------------------------------------------------------------|
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| `silent` | <pre>boolean</pre><br/>(`false`) | If `true`, then Kuzzle will not generate notifications <SinceBadge version="change-me"/> |

## Resolves

Expand Down
41 changes: 21 additions & 20 deletions doc/7/controllers/document/m-create-or-replace/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,43 @@ Creates or replaces multiple documents.
mCreateOrReplace(index, collection, documents, [options]);
```

| Argument | Type | Description |
| ------------ | --------------- | ---------------------------- |
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| Argument | Type | Description |
|--------------|---------------------|------------------------------|
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| `documents` | <pre>object[]</pre> | Array of documents to create |
| `options` | <pre>object</pre> | Query options |
| `options` | <pre>object</pre> | Query options |

### Options

Additional query options

| Options | Type<br/>(default) | Description |
| ---------- | ---------------------- | ---------------------------------------------------------------------------------- |
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | `string`<br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| Options | Type<br/>(default) | Description |
|------------|----------------------------------|------------------------------------------------------------------------------------------|
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| `silent` | <pre>boolean</pre><br/>(`false`) | If `true`, then Kuzzle will not generate notifications <SinceBadge version="change-me"/> |

## Resolves

Returns an object containing 2 arrays: `successes` and `errors`

Each created or replaced document is an object of the `successes` array with the following properties:

| Name | Type | Description |
| --------- | ----------------- | ------------------------------------------------------ |
| `_id` | <pre>string</pre> | Document ID |
| `_version` | <pre>number</pre> | Version of the document in the persistent data storage |
| `_source` | <pre>object</pre> | Document content |
| `created` | <pre>boolean</pre> | True if the document was created |
| Name | Type | Description |
|------------|--------------------|--------------------------------------------------------|
| `_id` | <pre>string</pre> | Document ID |
| `_version` | <pre>number</pre> | Version of the document in the persistent data storage |
| `_source` | <pre>object</pre> | Document content |
| `created` | <pre>boolean</pre> | True if the document was created |

Each errored document is an object of the `errors` array with the following properties:

| Name | Type | Description |
| --------- | ----------------- | ------------------------------------------------------ |
| `document` | <pre>object</pre> | Document that cause the error |
| `status` | <pre>number</pre> | HTTP error status |
| `reason` | <pre>string</pre> | Human readable reason |
| Name | Type | Description |
|------------|-------------------|-------------------------------|
| `document` | <pre>object</pre> | Document that cause the error |
| `status` | <pre>number</pre> | HTTP error status |
| `reason` | <pre>string</pre> | Human readable reason |

## Usage

Expand Down
35 changes: 18 additions & 17 deletions doc/7/controllers/document/m-create/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,42 @@ Creates multiple documents.
mCreate(index, collection, documents, [options]);
```

| Argument | Type | Description |
| ------------ | --------------- | ---------------------------- |
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| Argument | Type | Description |
|--------------|---------------------|------------------------------|
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| `documents` | <pre>object[]</pre> | Array of documents to create |
| `options` | <pre>object</pre> | Query options |
| `options` | <pre>object</pre> | Query options |

### Options

Additional query options

| Options | Type<br/>(default) | Description |
| ---------- | ---------------------- | ---------------------------------------------------------------------------------- |
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| Options | Type<br/>(default) | Description |
|------------|----------------------------------|------------------------------------------------------------------------------------------|
| `queuable` | <pre>boolean</pre><br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again |
| `refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) |
| `silent` | <pre>boolean</pre><br/>(`false`) | If `true`, then Kuzzle will not generate notifications <SinceBadge version="change-me"/> |

## Resolves

Returns an object containing 2 arrays: `successes` and `errors`

Each created document is an object of the `successes` array with the following properties:

| Name | Type | Description |
| --------- | ----------------- | ------------------------------------------------------ |
| `_id` | <pre>string</pre> | Document ID |
| Name | Type | Description |
|------------|-------------------|--------------------------------------------------------|
| `_id` | <pre>string</pre> | Document ID |
| `_version` | <pre>number</pre> | Version of the document in the persistent data storage |
| `_source` | <pre>object</pre> | Document content |

Each errored document is an object of the `errors` array with the following properties:

| Name | Type | Description |
| --------- | ----------------- | ------------------------------------------------------ |
| `document` | <pre>object</pre> | Document that cause the error |
| `status` | <pre>number</pre> | HTTP error status |
| `reason` | <pre>string</pre> | Human readable reason |
| Name | Type | Description |
|------------|-------------------|-------------------------------|
| `document` | <pre>object</pre> | Document that cause the error |
| `status` | <pre>number</pre> | HTTP error status |
| `reason` | <pre>string</pre> | Human readable reason |

## Usage

Expand Down
Loading