Search in sources :

Example 1 with OrdinalsReader

use of org.apache.lucene.facet.taxonomy.OrdinalsReader 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;
}
Also used : CachedOrdinalsReader(org.apache.lucene.facet.taxonomy.CachedOrdinalsReader) FastTaxonomyFacetCounts(org.apache.lucene.facet.taxonomy.FastTaxonomyFacetCounts) DocValuesOrdinalsReader(org.apache.lucene.facet.taxonomy.DocValuesOrdinalsReader) CachedOrdinalsReader(org.apache.lucene.facet.taxonomy.CachedOrdinalsReader) DocValuesOrdinalsReader(org.apache.lucene.facet.taxonomy.DocValuesOrdinalsReader) OrdinalsReader(org.apache.lucene.facet.taxonomy.OrdinalsReader) FastTaxonomyFacetCounts(org.apache.lucene.facet.taxonomy.FastTaxonomyFacetCounts) TaxonomyFacetCounts(org.apache.lucene.facet.taxonomy.TaxonomyFacetCounts)

Aggregations

CachedOrdinalsReader (org.apache.lucene.facet.taxonomy.CachedOrdinalsReader)1 DocValuesOrdinalsReader (org.apache.lucene.facet.taxonomy.DocValuesOrdinalsReader)1 FastTaxonomyFacetCounts (org.apache.lucene.facet.taxonomy.FastTaxonomyFacetCounts)1 OrdinalsReader (org.apache.lucene.facet.taxonomy.OrdinalsReader)1 TaxonomyFacetCounts (org.apache.lucene.facet.taxonomy.TaxonomyFacetCounts)1