org.apache.lucene.facet.search
public class SumValueSourceFacetRequest extends FacetRequest
FacetRequest which aggregates categories by the sum of the values,
returned by a ValueSource, in the documents they are associated with.
This allows aggregating the value of a category by e.g. summing the value of
a NumericDocValuesField indexed for the document, or a more complex
expression (from multiple fields) using the expressions module.FacetRequest.ResultMode, FacetRequest.SortOrdercategoryPath, numResults| Constructor and Description |
|---|
SumValueSourceFacetRequest(CategoryPath path,
int num,
ValueSource valueSource,
boolean requiresDocScores)
Constructor which takes the
ValueSource from which to read the
documents' values. |
| Modifier and Type | Method and Description |
|---|---|
FacetsAggregator |
createFacetsAggregator(FacetIndexingParams fip)
Returns the
FacetsAggregator which can aggregate the categories of
this facet request. |
equals, getDepth, getNumLabel, getResultMode, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortOrder, toStringpublic SumValueSourceFacetRequest(CategoryPath path, int num, ValueSource valueSource, boolean requiresDocScores)
ValueSource from which to read the
documents' values. You can also specify if the value source requires
document scores or not.public FacetsAggregator createFacetsAggregator(FacetIndexingParams fip)
FacetRequestFacetsAggregator which can aggregate the categories of
this facet request. The aggregator is expected to aggregate category values
into FacetArrays. If the facet request does not support that, e.g.
RangeFacetRequest, it can return null. Note though that
such requests require a dedicated FacetsAccumulator.createFacetsAggregator in class FacetRequestCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.