All,
I'm using Pivot Faceting (Solr 4.5) and trying to understand the best way
to accomplish the following:
1. Getting distinct counts for a field other than the one being faceted on.
2. How would I get this field to surface in the response.
To be more concrete, let's assume I have loaded into Solr web logs for my
e-commerce web site, so I have things like department and sub-department
(such as Mens and Shoes) on every hit to my site when people are browsing
for products (of course there are other pages, but lets assume we are just
interested in the product related pages). When I do a Pivot Facet using
facet.pivot=departmant,sub_departmen I get all the unique sub department
names grouped by departments each with a count that represents a web hit
for that department or sub-department. However, what if what I want is also
a count of the unique visitors (assume we have a field in each document
that has the a visitor identifier) that viewed the sub-department. Perhaps
something like the following in the result:
"facet_pivot": {
"departmant,sub_department": [
{
"field": "department",
"value": "Mens",
"count": 18661946,
"unique_visitors": 3096387,
"pivot": [
{
"field": "sub_department",
"value": "Shoes",
"count": 12385551,
"unique_visitors": 3096387
}
]
}
]
}
I am not sure if this is accomplishable using functions or perhaps part of
the goal of https://issues.apache.org/jira/browse/SOLR-5302 or just
something that I would need to write.
Any suggestions are greatly appreciated.
Thanks in advance,
Andrew