【发布时间】:2017-06-08 11:37:24
【问题描述】:
我刚开始使用 X-Pack for Elasticsearch 并希望连接来自嵌套文档类型的顶点。然而,寻找这方面的文档并没有让我有任何收获。
我拥有的是一个文档索引,其中包含人名/ID 作为嵌套文档(一个文档可以有很多人,一个人可以与多个文档相关)。期望的结果是得到一个人之间有联系的图数据。
有没有人有线索或者可以告诉我这是否可能?
我的部分映射:
mappings: {
legend: {
properties: {
persons: {
type: 'nested',
properties: {
id: {
type: 'string',
index: 'not_analyzed'
},
name: {
type: 'string',
index: 'not_analyzed'
}
}
}
}
}
}
还有我的 Graph API 查询,这当然不起作用,因为我不知道如何处理嵌套的“persons”字段的“name”字段。
POST sagenkarta_v3/_xpack/_graph/_explore
{
"controls": {
"use_significance": true,
"sample_size": 20000,
"timeout": 2000
},
"vertices": [
{
"field": "persons.name"
}
],
"connections": {
"vertices": [
{
"field": "persons.name"
}
]
}
}
提前致谢!
【问题讨论】:
标签: elasticsearch graph network-analysis xpack elasticsearch-x-pack