|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.facet.search.FacetRequest
org.apache.lucene.facet.range.RangeFacetRequest<T>
public class RangeFacetRequest<T extends Range>
A FacetRequest
for dynamic ranges based on a NumericDocValues
field or ValueSource
. This does not use the taxonomy index nor any
indexed facet values.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.facet.search.FacetRequest |
---|
FacetRequest.ResultMode, FacetRequest.SortOrder |
Field Summary | |
---|---|
String |
label
|
Range[] |
ranges
|
Fields inherited from class org.apache.lucene.facet.search.FacetRequest |
---|
categoryPath, numResults |
Constructor Summary | |
---|---|
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 . |
Method Summary | |
---|---|
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 . |
Methods inherited from class org.apache.lucene.facet.search.FacetRequest |
---|
equals, getDepth, getNumLabel, getResultMode, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortOrder, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Range[] ranges
public final String label
Constructor Detail |
---|
public 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.
Method Detail |
---|
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.
IOException
public FacetsAggregator createFacetsAggregator(FacetIndexingParams fip)
FacetRequest
FacetsAggregator
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 FacetRequest
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |