I have Solr documents having 3 fields Sender, Receiver and Time. I want to query what is the total time for all unique pair of Sender+Reciever.
Below is Solr Document format and 4 record(for example):
Sender Reciever Time
- John Robert 10
- John Rocky 20
- Robert John 10
- Rocky John 20
Expected Output
- John Robert ->Total Time = 20*(10+10)*
- John Rocky ->Total Time = 40*(20+20)*
What is the query that I can write for it(single or nested). I tried stats but I am not able to put condition for a unique pair.