Let's say I have the following set of grouped websites crawled and indexed in Solr (latest) :
{
"id":"1",
"domain": "http://www.category1website1.com",
"domainGroup": "Group 1"
},{
"id":"2",
"domain": "http://www.category1website2.com",
"domainGroup": "Group 1"
},{
"id":"3",
"domain": "http://www.category2website1.com",
"domainGroup": "Group 2"
}
I'm looking for a result set that will give me the term frequency in each individual domain but also the aggregated term frequency of that search term (aggregated by domainGroup).
Researching this has lead me to 3 possibilities:
1 and 2 are different and I'm not sure which would work for me, or worse, neither via "option" 3.
Sorry if it's not clear. I'm trying to retrieve the frequency of the "search term" but I also need the frequency aggregated by domainGroup field. In other words I need to search ALL domains for "search term" in one request and retrieve the frequency of "search term" in NOT ONLY the individual domains (the default), but also the aggregated frequencies for all domainGroups (so the sum of term frequencies in all domains under the same domainGroup).
I think the Facets with Term frequency Vectors is what you need. Try a query like this: