The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest.
How can I do that with elastic search or any other solution would be good.
{
{id: 1, time: 12345},
{id: 2, time: 12346},
{id: 1, time: 12347},
{id: 2, time: 12348},
{id: 1, time: 12349},
{id: 3, time: 12350},
... // 10 different ids and 10000 records
}