{
'companyName' : 'xyz',
'title' : 'xyz acquired companyB',
'source' : 'google.com'
},
{
'companyName' : 'xyz',
'title' : 'xyz acquired companyB'
'source' : 'bing.com'
}
Above is the structure of my SOLR document.
The requirement which I have is, I have to group the document by 'companyName' and fetch only unique results of 'title'.
The result has to be something like this
"groups":[{
"groupValue":"xyz",
"doclist":{"numFound":1,"start":0,"docs":[
{
'companyName' : 'xyz',
'title' : 'xyz acquired companyB',
'source' : 'google.com'
}
]
}
]
I tried what is specified in here. But I'm unable to achieve the requirement.