The idea worked! Thank you! It may need some more tweeking, however for now looks good enough.
PUT test2
{
"mappings": {
"transaciton": {
"properties": {
"timestamp" : { "type" : "date"},
"sessionID": { "type": "integer" },
"connectAt" : {"type" : "date"},
"disconnectAt" : {"type" : "date"},
"duration": { "type": "date" },
"message": { "type": "text",
"fielddata": true},
"active":{"type":"boolean"}
}
}
PUT test2/transaciton/1
{
"timestamp":"2019-06-12T12:00:01Z",
"sessionID": "1",
"connectAt":"2019-06-12T12:00:00Z",
"disconnectAt":"2019-06-12T12:01:30Z",
"durations":[
{"duration":"2019-06-12T12:00:00Z"},
{"duration":"2019-06-12T12:00:30Z"},
{"duration":"2019-06-12T12:01:00Z"},
{"duration":"2019-06-12T12:01:30Z"}
],
"message":"SUCCEED",
"active":false
}
PUT test2/transaciton/2
{
"timestamp":"2019-06-12T12:01:01Z",
"sessionID": "2",
"connectAt":"2019-06-12T12:01:00Z",
"disconnectAt":"2019-06-12T12:01:30Z",
"durations":[
{"stamp":"2019-06-12T12:01:00Z"},
{"stamp":"2019-06-12T12:01:30Z"}
],
"message":"SUCCEED",
"active":false
}
PUT test2/transaciton/3
{
"timestamp":"2019-06-12T11:59:01Z",
"sessionID": "3",
"connectAt":"2019-06-12T11:59:00Z",
"disconnectAt":"2019-06-12T12:01:00Z",
"durations":[
{"stamp":"2019-06-12T11:59:00Z"},
{"stamp":"2019-06-12T11:59:30Z"},
{"stamp":"2019-06-12T12:01:00Z"}
],
"message":"SUCCEED",
"active":false
}
PUT test2/transaciton/4
{
"timestamp":"2019-06-12T12:00:31Z",
"sessionID": "4",
"connectAt":"2019-06-12T12:00:30Z",
"disconnectAt":"2019-06-12T12:02:00Z",
"durations":[
{"stamp":"2019-06-12T12:00:00Z"},
{"stamp":"2019-06-12T12:00:30Z"},
{"stamp":"2019-06-12T12:01:00Z"},
{"stamp":"2019-06-12T12:01:30Z"},
{"stamp":"2019-06-12T12:02:00Z"}
],
"message":"SUCCEED",
"active":false
}
PUT test2/transaciton/5
{
"timestamp":"2019-06-12T12:01:21Z",
"sessionID": "5",
"connectAt":"2019-06-12T12:01:20Z",
"disconnectAt":"2019-06-12T12:03:20Z",
"durations":[
{"stamp":"2019-06-12T12:01:20Z"},
{"stamp":"2019-06-12T12:01:50Z"},
{"stamp":"2019-06-12T12:02:20Z"},
{"stamp":"2019-06-12T12:02:50Z"},
{"stamp":"2019-06-12T12:03:20Z"}
],
"message":"SUCCEED",
"active":false
}
PUT test2/transaciton/6
{
"sessionID": "6",
"connectAt":"2019-06-12T12:05:20Z",
"disconnectAt":"2019-06-12T12:07:20Z",
"durations":[
{"stamp":"2019-06-12T12:05:20Z"},
{"stamp":"2019-06-12T12:05:50Z"},
{"stamp":"2019-06-12T12:06:20Z"},
{"stamp":"2019-06-12T12:06:50Z"},
{"stamp":"2019-06-12T12:07:20Z"}
],
"message":"SUCCEED",
"active":false
}
PUT test2/transaciton/7
{
"timestamp":"2019-06-12T12:15:21Z",
"sessionID": "7",
"connectAt":"2019-06-12T12:15:20Z",
"disconnectAt":"2019-06-12T12:17:20Z",
"durations":[
{"stamp":"2019-06-12T12:15:20Z"},
{"stamp":"2019-06-12T12:15:50Z"},
{"stamp":"2019-06-12T12:16:20Z"},
{"stamp":"2019-06-12T12:16:50Z"},
{"stamp":"2019-06-12T12:17:20Z"}
],
"message":"SUCCEED",
"active":false
}