How to create relationship between two indices

I Have two indices

  1. read_format
  2. device_status_format

now i want to join data of that two indices

data format of read_format

"hits": [
{
"_index": "read_format",
"_type": "doc",
"_id": "9FmifGYBii-5lA4ewFu3",
"_score": 1,
"_source": {
"WMPower": 30,
"CommMode": "Wireless",
"WUName": "Jalef",
"tags": [
"beats_input_raw_event"
],
"CTNo": "264",
"WMExpon": "LL",
"WUNo": "32698",
"WMValve": 100,
"ReadTime": "13:25:12",
"offset": 426,
"host": {
"name": "EQUEST025"
},
"type": "read_format",
"@timestamp": "2018-10-16T11:28:51.489Z",
"fields": {
"log_type": "read_format"
},
"source": """D:\logs\read_format.json""",
"ReadDate": "2018-10-16",
"beat": {
"version": "6.4.2",
"hostname": "EQUEST025",
"name": "EQUEST025"
},
"@version": "1",
"CENo": "1392658740",
"WMCode": "359647012",
"ElecAttacks": "0"
}
}
]

data format of device_status_format

"hits": [
{
"_index": "device_status_format",
"_type": "doc",
"_id": "ukFMgGYBuf46FDrIVau1",
"_score": 1,
"_source": {
"CENo": "1392658740",
"offset": 1561,
"ReadTime": "14:48:08",
"source": """D:\logs\device_status_format.json""",
"tags": [
"beats_input_raw_event"
],
"type": "device_status_format",
"UnusualAmount": "165",
"beat": {
"name": "EQUEST025",
"version": "6.4.2",
"hostname": "EQUEST025"
},
"fields": {
"log_type": "device_status_format"
},
"ReadDate": "2018-10-16",
"CEState": "Offline",
"@version": "1",
"WUName": "Ctelj",
"ReadAmount": "32",
"WUNo": "54702",
"CEType": "Wired table concentrator",
"@timestamp": "2018-10-17T04:32:56.945Z",
"host": {
"name": "EQUEST025"
}
}
},
{
"_index": "device_status_format",
"_type": "doc",
"_id": "_Fm9fGYBii-5lA4e2VtP",
"_score": 1,
"_source": {
"UnusualAmount": "891",
"tags": [
"beats_input_raw_event"
],
"CEState": "Offline",
"ReadAmount": "25",
"WUNo": "80765",
"offset": 975,
"ReadTime": "13:48:20",
"host": {
"name": "EQUEST025"
},
"type": "device_status_format",
"@timestamp": "2018-10-16T11:58:26.571Z",
"fields": {
"log_type": "device_status_format"
},
"source": """D:\logs\device_status_format.json""",
"ReadDate": "2018-10-16",
"beat": {
"version": "6.4.2",
"name": "EQUEST025",
"hostname": "EQUEST025"
},
"CEType": "Wired table concentrator",
"@version": "1",
"CENo": "1392658740",
"WUName": "Hbckw"
}
}
]

  • now i want to join on CENo fileds and getting matching records.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.