【发布时间】:2017-04-10 13:28:39
【问题描述】:
我正在使用 elasticsearch5 和 kibana5 从 facebook graph api 开发基于 facebook cmets 的仪表板。我添加了一些分析的字段,它们出现在 Kibana 的发现部分,但是在进行可视化时我没有找到这些字段。
我的 facebook cmets 索引:
PUT fb_comments
{
"settings": {
"analysis": {},
"mapping.ignore_malformed": true
},
"mappings": {
"fb_comment": {
"dynamic_templates": [
{
"created_time": {
"match": "created_time",
"mapping": {
"type": "date",
"format": "epoch_second"
}
}
},
{
"message": {
"match": "message",
"mapping": {
"type": "string",
"analyzer": "simple"
}
}
},
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
}
]
}
}
}
The field message the analyzed one is appearing in discover The field message the analyzed one is not appearing in visualization part
【问题讨论】:
-
嗨,我不确定,但是在弹性 5 中,如果不分析,则将“字符串”类型更改为“关键字”,如果分析,则更改为“文本”elastic.co/guide/en/elasticsearch/reference/current/text.html 尝试将映射更改为:{“字符串”: { "match_mapping_type": "string", "mapping": { "type": "keyword" } } }
标签: elasticsearch kibana kibana-5