My SOLR application features faceting on a "descendant_path" field. The number of facet can be great (eg 100) and I don't find it useful. So I would better have X (eg 2) facets and an extra one labelled "others".
So far I have :
- set an unlimited number of facets (with facet.limit = -1),
- sorted them in decreasing count (with facet.sort = count),
- taken the first X (eg 2) elements
- added the counts of the next elements together to form the "others" count
because I could not find a Solr faceting parameter that could do that.
Consequently not to reinvent the wheel, I need to know if there is already a Solr parameter that can return the sum of all the facet counts that are not returned within the facet.limit ?
For example if Solr returns 5 facets with facet.limit = -1
A (34)
B (30)
C (28)
D (10)
E (4)
If now I set the facet.limit = 2
it will return
A (34)
B (30)
Is there a parameter that returns the sum of all the counts from the facets that are not included (ie counts of C, D and E together) => Others (42) ?
Please note : facet.missing
did not do the trick since it deals with documents with missing category not document with missing facet.
Is there really no parameter to achieve my goal or I simply missed it ?
Any help appreciated