尝试更新search_analyzer对 type_one 字段时抛出异常 "Merge failed with failures...".
但是这样会成功
添加update_all_types参数会更新type_one和type_two中的文本字段。
Get Mapping /获取映射
The get mapping API allows to retrieve mapping definitions for an index or index/type.
Multiple Indices and Types
The get mapping API can be used to get more than one index or type mapping with a single call. General usage of the API follows the following syntax: host:port/{index}/_mapping/{type} where both {index} and {type} can accept a comma-separated list of names. To get mappings for all indices you can use _all for {index}. The following are some examples:
If you want to get mappings of all indices and types then the following two examples are equivalent:
Get Field Mapping /获取字段映射
获取单个字段的映射配置
响应是(假设文本是默认字符串字段):
多个索引,类型和字段
get API可以用来获取字段映射,多字段映射多类型映射,多索引映射的一个调用。一般使用API遵循以下语法:host:port/{index}/{type}/_mapping/field/{field},{index}, {type} 和 {field}可以代表以逗号分隔的名称或通配符。为所有索引到映射可以使用_all代替{index}。以下是一些例子: