- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 139字
- 2021-06-24 14:52:18
How it works...
This call checks if the index exists and then it creates one or more types of mapping, as described in the definition. To learn how to define a mapping description, see Chapter 3, Managing Mapping.
During mapping insertion, if there is an existing mapping for this type, it is merged with the new one. If there is a field with a different type and the type could not be updated, an exception expanding the fields property is raised. To prevent an exception during the merging mapping phase, it's possible to specify the ignore_conflicts parameter as true (default is false).
The PUT mapping call allows you to set the type for several indices in one go; that is, list the indices separated by commas or, to apply all the indexes, use the _all alias.