I have a set of document, that contains sender mail ids and recipient mail ids.
When I use facet query like facet.field=senderemailid&facet.limit=10&facet.offset=0
. So that I can get total no of mail sent by that corresponding mail id
Result was
< int name="xxx@e.com" > 157 < int >
< int name="x11@e.com" > 141 < int >
< int name="x22@e.com" > 32 < int >
As well when I use facet.field=recipientmailid&facet.limit=10&facet.offset=0
, I can get total no of mail received by that corresponding mail Id.
Result was
< int name="x1x@e.com" > 41 < int >
< int name="x22@e.com" > 132 < int >
< int name="x2y@e.com" > 92 < int >
Once I get the result I use java code to group result that each email id received how many no of email and sent how many no of emails.In this way I can't achieve the pagination.Because both result differ on some email id.
What is my expectation is,
< int name="x22@e.com" >
< int > 32 < int >
< int > 132 < int >
< int name="x22@e.com" >
So at one shot I can get sent email & received email count at one shot.I don't need to use java code to group the result.
Is any ways exist in solr to group result in solr itself, so that I can avoid java code to group result as well I can achieve pagination
[Note : recipientmailid and senderemailid both are multivalued.If necessary later I can change senderemailid to singlevalued.But recipient mail Id should be in multivalued.]