The documentation of solr for facet.limit says that facet limit can be set of per field basis. The setFacetLimit() method present in SolrQuery API gets applied for all the fields that are faceted. Following is the piece of code through which I was trying to achieve different facetlimits for different fields.
SolrQuery query = new SolrQuery();
if(facetFieldName = "bookName")
{
query.setFacetLimit(20).addFacetField(facetFieldName);
} else {
query.setFacetLimit(10).addFacetField(facetFieldName);
}
How can I set different facet limits for different facet fields? Any help would be highly appreciated.