I have a index which includes two types of _type .
However , on Kibana , I am only able to see 1 type.
This index has 2 types, text and binary.
I have indexed two different types from different source in below order.
1 index document using index function of python-api
es.index( index=get_index_name(fp) + get_current_date(), doc_type=attachment_type, body=doc)
above get_index_returns this
"attachment-web-"
2 index document using logstash.
elasticsearch {
hosts => ["http://127.0.0.1:9200"]
index => "attachment-web-%{[@metadata][index_date]}"
document_type => "text"
user => "elastic"
password => "elastic"
}
Both use below template.
{
"template" : "index-web-*",
"mappings" : {
"web" : {
"properties" : {
"access_time" : { "type" : "date", "format" : "yyyy-MM-dd HH:mm:ss" },
"source_ip" : { "type" : "keyword" },
"source_mac" : { "type" : "keyword" },
"web_host" : { "type" : "keyword" },
"web_host_mac" : { "type" : "keyword" },
"url" : { "type" : "keyword" },
"content_type" : { "type" : "keyword" },
"req_method" : { "type" : "keyword" },
"resp_body_size" : { "type" : "integer" },
"stored_file" : { "type" : "keyword" }
}
}
}
}
According to elasticsearch.log , looks like the mapping is updated when the indexing by logstash
[2017-03-03T12:21:28,485][INFO ][o.e.c.m.MetaDataMappingService] [IL9zTP3] [attachment-web-2017.03.03/2T7Ehp65Tgi-Qn81pKxv8Q] create_mapping [binary]
[2017-03-03T12:24:54,722][INFO ][o.e.c.m.MetaDataCreateIndexService] [IL9zTP3] [attachment-mail-2017.03.03] creating index, cause [auto(index api)], templates [attachment-mail], shards [5]/[1], mappings [text]
[2017-03-03T12:24:54,915][INFO ][o.e.c.m.MetaDataMappingService] [IL9zTP3] [attachment-mail-2017.03.03/i-FSgDwZQDeQy91rImYz_w] create_mapping [binary]
[2017-03-03T12:25:08,726][INFO ][o.e.c.m.MetaDataMappingService] [IL9zTP3] [attachment-web-2017.03.03/2T7Ehp65Tgi-Qn81pKxv8Q] update_mapping [text]
[2017-03-03T12:25:09,341][INFO ][o.e.c.m.MetaDataMappingService] [IL9zTP3] [attachment-mail-2017.03.03/i-FSgDwZQDeQy91rImYz_w] update_mapping [text]
Is this update_mapping causing Kibana to not show type binary? If yes , How can I avoid the update_mapping?