use of org.apache.lucene.facet.taxonomy.TaxonomyFacetCounts in project lucene-solr by apache.
the class FacetTestCase method getTaxonomyFacetCounts.
public Facets getTaxonomyFacetCounts(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector c, String indexFieldName) throws IOException {
Facets facets;
if (random().nextBoolean()) {
facets = new FastTaxonomyFacetCounts(indexFieldName, taxoReader, config, c);
} else {
OrdinalsReader ordsReader = new DocValuesOrdinalsReader(indexFieldName);
if (random().nextBoolean()) {
ordsReader = new CachedOrdinalsReader(ordsReader);
}
facets = new TaxonomyFacetCounts(ordsReader, taxoReader, config, c);
}
return facets;
}
Aggregations