对于这个系列:
{
room: 'room1',
owner: 'user1',
time: 'time1'
},
{
room: 'room1',
owner: 'user1',
time: 'time2'
},
{
room: 'room2',
owner: 'user1',
time: 'time3'
},
{
room: 'room2',
owner: 'user1',
time: 'time4'
},
{
room: 'room3',
owner: 'user1',
time: 'time5'
},
{
room: 'room3',
owner: 'user1',
time: 'time6'
}
如何发布数据以便为每个房间返回最长时间的文档:
{
room: 'room1',
owner: 'user1',
time: 'time2'
},
{
room: 'room2',
owner: 'user1',
time: 'time4'
},
{
room: 'room3',
owner: 'user1',
time: 'time6'
}