Can elasticsearch aggregation flip one to many relationship?

  Kiến thức lập trình

what the collection in elasticsearch looks like:

A{ users[1,2,4] }

B{ users[2,3,4] }

C{ users[1,3] }

output I want to achieve:

1{events[A,C]}

2{ events[A,B] }

3{ events[B,C] }

4{ events[A,B] }

LEAVE A COMMENT