org.apache.solr.handler.component
Class FieldFacetStats

java.lang.Object
  extended by org.apache.solr.handler.component.FieldFacetStats

public class FieldFacetStats
extends Object

FieldFacetStats is a utility to accumulate statistics on a set of values in one field, for facet values present in another field.

9/10/2009 - Moved out of StatsComponent to allow open access to UnInvertedField

See Also:
StatsComponent

Field Summary
 Map<String,StatsValues> facetStatsValues
           
 String name
           
 
Constructor Summary
FieldFacetStats(SolrIndexSearcher searcher, String name, SchemaField field_sf, SchemaField facet_sf, boolean calcDistinct)
           
 
Method Summary
 boolean accumulateTermNum(int statsTermNum, BytesRef value)
           
 void facet(int docID)
           
 boolean facetTermNum(int docID, int statsTermNum)
           
 void setNextReader(AtomicReaderContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public final String name

facetStatsValues

public final Map<String,StatsValues> facetStatsValues
Constructor Detail

FieldFacetStats

public FieldFacetStats(SolrIndexSearcher searcher,
                       String name,
                       SchemaField field_sf,
                       SchemaField facet_sf,
                       boolean calcDistinct)
Method Detail

facet

public void facet(int docID)
           throws IOException
Throws:
IOException

facetTermNum

public boolean facetTermNum(int docID,
                            int statsTermNum)
                     throws IOException
Throws:
IOException

accumulateTermNum

public boolean accumulateTermNum(int statsTermNum,
                                 BytesRef value)
                          throws IOException
Throws:
IOException

setNextReader

public void setNextReader(AtomicReaderContext ctx)
                   throws IOException
Throws:
IOException


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