public static class IntervalFacets.FacetInterval extends Object
| Constructor and Description |
|---|
FacetInterval(SchemaField schemaField,
String startStr,
String endStr,
boolean includeLower,
boolean includeUpper,
String key)
Constructor that accepts already parsed values of start and end.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCount() |
String |
getKey() |
org.apache.solr.request.IntervalFacets.IntervalCompareResult |
includes(long value)
Method to use to check whether a document should be counted for
an interval or not.
|
String |
toString() |
void |
updateContext(org.apache.lucene.index.SortedDocValues sdv)
Update the ordinals based on the current reader.
|
void |
updateContext(org.apache.lucene.index.SortedSetDocValues sdv)
Update the ordinals based on the current reader.
|
public FacetInterval(SchemaField schemaField, String startStr, String endStr, boolean includeLower, boolean includeUpper, String key)
schemaField - schemaField for this rangestartStr - String representation of the start value of this interval. Can be a "*".endStr - String representation of the end value of this interval. Can be a "*".includeLower - Indicates weather this interval should include values equal to startincludeUpper - Indicates weather this interval should include values equal to endkey - String key of this intervalpublic void updateContext(org.apache.lucene.index.SortedDocValues sdv)
updateContext(SortedSetDocValues) depending on the
DocValues type) needs to be called for every reader before
includes(long) is called on any document of the reader.sdv - DocValues for the current readerpublic void updateContext(org.apache.lucene.index.SortedSetDocValues sdv)
updateContext(SortedDocValues) depending on the
DocValues type) needs to be called for every reader before
includes(long) is called on any document of the reader.sdv - DocValues for the current readerpublic org.apache.solr.request.IntervalFacets.IntervalCompareResult includes(long value)
updateContext(SortedDocValues)
or updateContext(SortedSetDocValues) (depending on the DV type). It
is OK to call this method without other previous calls on numeric fields
(with NumericDocValues)value - For numeric single value fields, this value
should be the long representation of the value of the document
in the specified field. For multi-valued and/or non-numeric fields, value
should be the ordinal of the term in the current segmentIntervalFacets.IntervalCompareResult.INCLUDED if the value is included in the interval
IntervalFacets.IntervalCompareResult.GREATER_THAN_END if the value is greater than endLimit
IntervalFacets.IntervalCompareResult.LOWER_THAN_START if the value is lower than startLimit
NumericUtils.floatToSortableInt(float),
NumericUtils.doubleToSortableLong(double)public int getCount()
public String getKey()
Copyright © 2000–2015 The Apache Software Foundation. All rights reserved.