SolrFacetQueryFactoryImpl extends AbstractSolrQueryFactory implements SolrFacetQueryFactory { @Override public synchronized SolrQuery createCountFacetsQuery(List<String> facets) { final SolrQuery query = getBaseQuery(facets); query.setFacetLimit(0); return query; } SolrFacetQueryFactoryImpl(); @Override SolrQuery createFacetQuery(QueryFacetsSelection queryFacetsSelections, List<String> facets, int facetValueLimit); @Override synchronized SolrQuery createCountFacetsQuery(List<String> facets);  }
@Test public void testCreateCountFacetsQuery() { SolrQuery query = instance.createCountFacetsQuery(FACET_FIELDS); assertArrayEquals(FACET_FIELDS.toArray(), query.getFacetFields()); }