我在弹性搜索数据生产中有 1 个用于存储文档的索引。该索引在每个文档中都有一个名为:document_type的公共字段,用于过滤不同类型的数据。
我在索引中有两种类型的文档:数据生产
一个。document_type = "用户"
湾。document_type = "用户详细信息"
示例数据
- 用户
{
"user_id" : "123",
"is_trial_active" : "true",
"updated_at" : "1577338950969",
"event_created_at" : "1577338950969",
"document_type" : "user"
}
- 用户详情
{
"user_id" : "123",
"name" : "Shivam",
"gender" : "male",
"event_created_at" : 1575519449473,
"phone_number" : "+91-8383838383",
"document_type" : "user_detail",
"created_at" : 1576049770184
}
笔记
- user_id 是两个document_type中的公共键
- 使用elasticsearch 7.3.1 版本
问题
如何从document_type =“user_details”中获取is_trial_active在document_type =“user”中不正确的用户的详细信息?