org.apache.lucene.facet.taxonomy
Class IntTaxonomyFacets

java.lang.Object
  extended by org.apache.lucene.facet.Facets
      extended by org.apache.lucene.facet.taxonomy.TaxonomyFacets
          extended by org.apache.lucene.facet.taxonomy.IntTaxonomyFacets
Direct Known Subclasses:
FastTaxonomyFacetCounts, TaxonomyFacetCounts, TaxonomyFacetSumIntAssociations

public abstract class IntTaxonomyFacets
extends TaxonomyFacets

Base class for all taxonomy-based facets that aggregate to a per-ords int[].


Field Summary
protected  int[] values
          Per-ordinal value.
 
Fields inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
children, config, indexFieldName, siblings, taxoReader
 
Constructor Summary
protected IntTaxonomyFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config)
          Sole constructor.
 
Method Summary
 Number getSpecificValue(String dim, String... path)
          Return the count or value for a specific path.
 FacetResult getTopChildren(int topN, String dim, String... path)
          Returns the topN child labels under the specified path.
protected  void rollup()
          Rolls up any single-valued hierarchical dimensions.
 
Methods inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
getAllDims, verifyDim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

protected final int[] values
Per-ordinal value.

Constructor Detail

IntTaxonomyFacets

protected IntTaxonomyFacets(String indexFieldName,
                            TaxonomyReader taxoReader,
                            FacetsConfig config)
                     throws IOException
Sole constructor.

Throws:
IOException
Method Detail

rollup

protected void rollup()
               throws IOException
Rolls up any single-valued hierarchical dimensions.

Throws:
IOException

getSpecificValue

public Number getSpecificValue(String dim,
                               String... path)
                        throws IOException
Description copied from class: Facets
Return the count or value for a specific path. Returns -1 if this path doesn't exist, else the count.

Specified by:
getSpecificValue in class Facets
Throws:
IOException

getTopChildren

public FacetResult getTopChildren(int topN,
                                  String dim,
                                  String... path)
                           throws IOException
Description copied from class: Facets
Returns the topN child labels under the specified path. Returns null if the specified path doesn't exist or if this dimension was never seen.

Specified by:
getTopChildren in class Facets
Throws:
IOException


Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.