elasticsearch - 如何在 Elasticsearch / Kibana 数据表可视化中将对象(嵌套)拆分为多列
问题描述
我有一个在 elasticsearch (7.10) 中索引的嵌套对象,我需要使用 kibana 表对其进行可视化。问题是 kibana 会在一列中输入嵌套字段中具有相同名称的值。
部分索引:
{
"index" : {
"mappings" : {
"properties" : {
"data1" : {
"type" : "keyword"
},
"Details" : {
"type" : "nested",
"properties" : {
"Amount" : {
"type" : "float"
},
"Currency" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"DetailType" : {
"type" : "keyword"
},
"Price" : {
"type" : "float"
},
"Quantity" : {
"type" : "float"
},
"TotalAmount" : {
"type" : "float"
.......
表中的问题:
如何获得三个名为 Details 的行,每行都有一个拆分项(例如 DetailType:“start_fee”)?
更新:我可以在控制台中查询嵌套对象:
GET _search
{
"query": {
"nested": {
"path": "Details",
"query": {
"bool": {
"must": [
{ "match": { "Details.DetailType": "energybased_fee" }}
]
}
},
"inner_hits": {
}
}}}
但是我怎样才能在表格中只看到“inner_hits”值呢?
解决方案
推荐阅读
- c - 从文件读取到链表的问题
- dart - 我想在 ListView.builder 中显示 firestore 数组
- java - :app:transformDexWithInstantRunSlicesApkForDebug 中的错误
- javascript - 无法解决致命异常:无法将消息的值从 ReadableNativeMap 转换为字符串
- shopify - 在 Shopify 中通过 SKU 而不是 Variant ID 添加产品
- mysql - 将 INNER JOIN 与插入和更新一起使用时在 VB.Net 中出现错误
- docker - docker-compose up 不监听指定端口
- java - 在spring boot中需要认证才能获取公共资源
- flutter - 在标签栏中向右溢出 88 像素颤振标签栏
- math - 如何在给定特定范围的列表中找到一对数字?