在Current [5.0] elasticsearch doc中,据说
所有多索引 API 都支持以下 url 查询字符串: ignore_unavailable和 allow_no_indices
我删除所有现有索引并尝试使用映射创建一个新索引
curl -XDELETE "http://elastic:elastic@127.0.0.1:9200/mail-*?pretty=true"
curl -XPUT "http://elastic:elastic@127.0.0.1:9200/mail-*?ignore_unavailable=true&pretty=true" -d ' {
"mappings": {
"ex": {
"properties": {
...
我收到了这个错误:
“请求 [/mail-*] 包含无法识别的参数:[ignore_unavailable]”
我需要创建此映射,因为索引是由 logstash 创建的,每天都有一个新索引 index => "mail-%{+YYYY.MM.dd}"
如果我删除索引名称中的通配符,它会起作用!
为什么我需要这样做,因为我在 logstash 中使用了 geoip 过滤器,但 geoip.location 不在“geo_point”类型中,并且如果没有这个,kibana tile map 将无法工作