Hi *,
I have some problems visualize data in timelion with this query:
.es(timefield=createdAt,index=test*,q="installUnique:ad822d4 AND controllerNumber:0 and channel_number.number:00",metric=max:channel_number.demand).label(demand)
The problem is the data structure itself, I can not change this index. And I need to visualize the inner hits of the array channel_number.demand filtered by channel_number.number="00"
{
"_index": "test",
"_type": "ctrls",
"_id": "5c7473a40c5bc84f",
"_version": 2,
"_score": 3.9815443,
"_source": {
"__v": 0,
"channel_number": [
{
"_id": "5c7473aa5bc859",
"act_state": false,
"demand": 0,
"number": "00"
},
{
"_id": "5c74bc858",
"act_state": false,
"demand": 0,
"number": "01"
}
],
"controllerNumber": "0",
"createdAt": "2019-02-25T23:00:52.293Z",
"installUnique": "768df22f25454",
},
"fields": {
"createdAt": [
"2019-02-25T23:00:52.293Z"
]
}
How can I unmarshall the channel_number array in order to visualize it correctly in timelion? Do I need to create an index alias or something like that?