org.apache.lucene.facet.range
public class RangeFacetRequest<T extends Range> extends FacetRequest
FacetRequest for dynamic ranges based on a NumericDocValues
field or ValueSource. This does not use the taxonomy index nor any
indexed facet values.FacetRequest.ResultMode, FacetRequest.SortOrder| Modifier and Type | Field and Description |
|---|---|
String |
label |
Range[] |
ranges |
categoryPath, numResults| Constructor and Description |
|---|
RangeFacetRequest(String field,
List<T> ranges)
Create a request for the given ranges over the specified
NumericDocValues field. |
RangeFacetRequest(String field,
T... ranges)
Create a request for the given ranges over the specified
NumericDocValues field. |
RangeFacetRequest(String label,
ValueSource valueSource,
List<T> ranges)
Create a request for the given ranges over the specified
ValueSource. |
RangeFacetRequest(String label,
ValueSource valueSource,
T... ranges)
Create a request for the given ranges over the specified
ValueSource. |
| Modifier and Type | Method and Description |
|---|---|
FacetsAggregator |
createFacetsAggregator(FacetIndexingParams fip)
Returns the
FacetsAggregator which can aggregate the categories of
this facet request. |
FunctionValues |
getValues(AtomicReaderContext context)
Returns the
FunctionValues for the given
AtomicReaderContext. |
equals, getDepth, getNumLabel, getResultMode, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortOrder, toStringpublic RangeFacetRequest(String field, T... ranges)
NumericDocValues field. The field will be used to as the root's
FacetResultNode label.public RangeFacetRequest(String field, List<T> ranges)
NumericDocValues field. The field will be used to as the root's
FacetResultNode label.public RangeFacetRequest(String label, ValueSource valueSource, T... ranges)
ValueSource. The label will be used to as the root's
FacetResultNode label.public RangeFacetRequest(String label, ValueSource valueSource, List<T> ranges)
ValueSource. The label will be used to as the root's
FacetResultNode label.public FunctionValues getValues(AtomicReaderContext context) throws IOException
FunctionValues for the given
AtomicReaderContext. If the request was created over a
NumericDocValues field, the respective NumericDocValues is
returned.IOExceptionpublic 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.