Not directly for a field facet. Range and date facets do have the concept of "other" to give you more details, but field facet doesn't have that.

But, you can calculate that number easily - it is numFound minus the sum of the facet counts for the field, minus "missing".

Still, I agree that it would be nice to enable it directly, like "facet.others=true".

-- Jack Krupansky

-----Original Message----- From: Raheel Hasan
Sent: Monday, June 10, 2013 10:56 AM
To: solr-user@lucene.apache.org
Subject: Facet count for "others" after facet.limit

Hi,

Is there anyway to use facet such that the results shows "Others" (or any
default value) and show all the others?

For example:

<str name="facet">on</str>
<str name="facet.field">category_code</str>
<str name="facet.sort">count</str>
<str name="facet.limit">6</str>
<str name="facet.mincount">1</str>
<str name="facet.missing">false</str>

This will show top 6 different products counts divided into the categories.
However, there are say 20 different categories and I want the rest of the
counts to into "Others". so we have a total of 7 facet counts only: 6
categories and all the rest in "Others".

Please let me know how to do this. thanks..

--
Regards,
Raheel Hasan

Reply via email to