【发布时间】:2016-09-10 07:50:08
【问题描述】:
我在弹性索引中有两种类型,例如员工和城市,
员工类型的文档结构是这样的
[{
"_index": "zase",
"_type": "Employees",
"_id": "100",
"_score": 1,
"_source": {
"sid": 100,
"name": "San Andreas",
"stageid": 0
}
},
{
"_index": "zase",
"_type": "Employees",
"_id": "101",
"_score": 1,
"_source": {
"sid": 101,
"name": "Zack",
"stageid": 0
}
}]
类型城市的文档结构如下,
[{
"_index": "zase",
"_type": "Cities",
"_id": "1",
"_score": 1,
"_source": {
"sid": 1,
"name": "Virginia",
"EmployeesID": [
0:100,
1:125,
2:143
]
}
},
{
"_index": "zase",
"_type": "Cities",
"_id": "2",
"_score": 1,
"_source": {
"sid": 2,
"name": "New Field",
"EmployeesID": [
0: 110
]
}
}]
使用城市名称“弗吉尼亚”查询弹性搜索时,我需要获取 Cities.EmployeesID ==Employees.sid 的员工信息,
在 Elastic Search 中是否可以跨不同类型执行此 RDBMS Join 操作? 任何帮助将不胜感激。
【问题讨论】:
标签: elasticsearch lucene nest nosql