You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mathias Hodler <ma...@gmail.com> on 2012/02/29 10:28:36 UTC
How to only count distinct facet values of each group
Hi,
I'm looking for a parameter like "group.truncate=true". Though I not
only want to count facets based on the most relevant document of each
group but based on all documents. Moreover if a facet value is in more
than in one document of a group it should only count once.
Example:
Doc 1:
type: shirt
color: green
Doc 2:
type: shirt
color: green
Doc 3:
type: shirt
color: blue
Doc 4:
type: pants
color: black
grouping by field 'type' should create following facet:
Color:
green: 1
blue: 1
black: 1
Thanks.