for topic title and description of API function
Signed-off-by: alicejw <alicejw@amazon.com>
This commit is contained in:
parent
2aba05aa0d
commit
4b5b706220
|
@ -6,11 +6,11 @@ grand_parent: REST API reference
|
||||||
nav_order: 220
|
nav_order: 220
|
||||||
---
|
---
|
||||||
|
|
||||||
# Update mapping
|
# Create or update mappings
|
||||||
Introduced 1.0
|
Introduced 1.0
|
||||||
{: .label .label-purple }
|
{: .label .label-purple }
|
||||||
|
|
||||||
If you want to add or update field types to an existing index, you can use the update mapping API operation.
|
If you want to create or add mappings and fields to an index, you can use the put mapping API operation.
|
||||||
|
|
||||||
You can't use this operation to update mappings that already map to existing data in the index. You must first create a new index with your desired mappings, and then use the [reindex API operation]({{site.url}}{{site.baseurl}}/opensearch/reindex-data) to map all the documents from your old index to the new index. If you don't want any downtime while you re-index your indexes, you can use [aliases]({{site.url}}{{site.baseurl}}/opensearch/index-alias).
|
You can't use this operation to update mappings that already map to existing data in the index. You must first create a new index with your desired mappings, and then use the [reindex API operation]({{site.url}}{{site.baseurl}}/opensearch/reindex-data) to map all the documents from your old index to the new index. If you don't want any downtime while you re-index your indexes, you can use [aliases]({{site.url}}{{site.baseurl}}/opensearch/index-alias).
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ PUT /<target-index>/_mapping
|
||||||
PUT /_mapping
|
PUT /_mapping
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use the update mapping operation to update multiple indices with one request.
|
You can also use the put mapping operation to update multiple indexes with one request.
|
||||||
|
|
||||||
```
|
```
|
||||||
PUT /<target-index1>,<target-index2>/_mapping
|
PUT /<target-index1>,<target-index2>/_mapping
|
||||||
|
@ -51,7 +51,7 @@ All update mapping parameters are optional.
|
||||||
|
|
||||||
Parameter | Data Type | Description
|
Parameter | Data Type | Description
|
||||||
:--- | :--- | :---
|
:--- | :--- | :---
|
||||||
<target-index> | N/A | The index to add the mapping to. If you do not specify this parameter, OpenSearch adds the mapping to all indexes within the cluster.
|
<target-index> | N/A | Specifies an index to associate the mapping. If you do not specify this parameter, OpenSearch adds the mapping to all indexes within the cluster.
|
||||||
allow_no_indices | Boolean | Whether to ignore wildcards that don’t match any indexes. Default is `true`.
|
allow_no_indices | Boolean | Whether to ignore wildcards that don’t match any indexes. Default is `true`.
|
||||||
expand_wildcards | String | Expands wildcard expressions to different indexes. Combine multiple values with commas. Available values are `all` (match all indexes), `open` (match open indexes), `closed` (match closed indexes), `hidden` (match hidden indexes), and `none` (do not accept wildcard expressions), which must be used with `open`, `closed`, or both. Default is `open`.
|
expand_wildcards | String | Expands wildcard expressions to different indexes. Combine multiple values with commas. Available values are `all` (match all indexes), `open` (match open indexes), `closed` (match closed indexes), `hidden` (match hidden indexes), and `none` (do not accept wildcard expressions), which must be used with `open`, `closed`, or both. Default is `open`.
|
||||||
ignore_unavailable | Boolean | If true, OpenSearch does not include missing or closed indexes in the response.
|
ignore_unavailable | Boolean | If true, OpenSearch does not include missing or closed indexes in the response.
|
||||||
|
|
Loading…
Reference in New Issue