org.apache.lucene.facet.taxonomy
Class FloatTaxonomyFacets

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.FloatTaxonomyFacets
Direct Known Subclasses:
TaxonomyFacetSumFloatAssociations, TaxonomyFacetSumValueSource

public abstract class FloatTaxonomyFacets
extends TaxonomyFacets

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


Field Summary
protected  float[] values
          Per-ordinal value.
 
Fields inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
children, config, indexFieldName, siblings, taxoReader
 
Constructor Summary
protected FloatTaxonomyFacets(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 float[] values
Per-ordinal value.

Constructor Detail

FloatTaxonomyFacets

protected FloatTaxonomyFacets(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.