Update put-mapping.md: add "dynamic" (#3384)

* Update put-mapping.md: add an example for "dynamic": "strict" in index mapping JSON

* Apply suggestions from code review

---------

Co-authored-by: Aria Marble <111301581+ariamarble@users.noreply.github.com>
This commit is contained in:
Arnoldas Grigutis 2023-03-16 18:42:13 +02:00 committed by GitHub
parent 0f44dc3a9e
commit eead5ecf29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -40,6 +40,23 @@ The request body must contain `properties`, which has all of the mappings that y
}
```
## Optional request body fields
### dynamic
You can make the document structure match the structure of the index mapping by setting the `dynamic` request body field to `strict`, as seen in the following example:
```json
{
"properties":{
"dynamic": "strict",
"color":{
"type": "text"
}
}
}
```
## Optional query parameters
Optionally, you can add query parameters to make a more specific request. For example, to skip any missing or closed indexes in the response, you can add the `ignore_unavailable` query parameter to your request as follows: