我正在尝试选择包含由id字段分组的elasticsearch中的另一个文档的文档。我认为下一个例子更加明白:
"doc1": {
"id": "firstid"
"my_field":"1"
}
"doc2": {
"id": "firstid"
"my_field":"12"
}
"doc3": {
"id": "firstid"
"my_field":"123"
}
"doc4": {
"id": "secondid"
"my_field":"1234"
}
"doc5": {
"id": "firstid"
"my_field":"12"
}
"doc6": {
"id": "firstid"
"my_field":"1"
}
"doc7": {
"id":"firstid"
"my_field":"qwerty"
}
"doc8" {
"id": "firstid"
"my_field": "qwer"
}
我希望输出
"doc3":{
"id": "firstid"
"my_field":"123"
}
"doc4": {
"id": "secondid"
"my_field":"1234"
}
"doc7" {
"id": "firstid"
"my_field": "qwerty"
}
提前谢谢!