在 Kibana 中处理来自不同类型的重复字段
Handling Duplicate Fields From Separate Types in Kibana
我目前使用的是 Kibana 4,但在为特定类型创建可视化时遇到问题。我的 ElasticSearch 索引看起来像这样:
{
"school_data": {
"mappings": {
"teacher": {
"properties": {
"Name": {
"type": "string"
},
"School": {
"type": "string"
}
}
},
"student": {
"properties": {
"Name": {
"type": "string"
},
"School": {
"type": "string"
}
}
}
}
}
}
其中索引为school_data
,两种类型为teacher
和student
。我可以将索引 school_data
加载到 Kibana 中,但我能看到的关于该索引的唯一字段是 Name
和 School
。有没有办法制作仅针对其中一种类型的可视化?即,我可以制作一个可视化图表,显示前 20 个不同 teacher
名称的数量吗?
您应该可以 select 通过在搜索栏 _type: "<your_type>"
中输入所需类型的文档。此搜索只会 select 具有该特定类型的文档。这将允许您进行可视化,显示 <your_type>
.
的前 20 个计数
我目前使用的是 Kibana 4,但在为特定类型创建可视化时遇到问题。我的 ElasticSearch 索引看起来像这样:
{
"school_data": {
"mappings": {
"teacher": {
"properties": {
"Name": {
"type": "string"
},
"School": {
"type": "string"
}
}
},
"student": {
"properties": {
"Name": {
"type": "string"
},
"School": {
"type": "string"
}
}
}
}
}
}
其中索引为school_data
,两种类型为teacher
和student
。我可以将索引 school_data
加载到 Kibana 中,但我能看到的关于该索引的唯一字段是 Name
和 School
。有没有办法制作仅针对其中一种类型的可视化?即,我可以制作一个可视化图表,显示前 20 个不同 teacher
名称的数量吗?
您应该可以 select 通过在搜索栏 _type: "<your_type>"
中输入所需类型的文档。此搜索只会 select 具有该特定类型的文档。这将允许您进行可视化,显示 <your_type>
.