public class PivotFacetValue extends Object
PivotFacetField
parent. This PivotFacetValue
may itself have a
nested PivotFacetField
childPivotFacetField
,
PivotFacetFieldValueCollection
Modifier and Type | Method and Description |
---|---|
NamedList<Object> |
convertToNamedList()
A recursive method for generating a NamedList from this value suitable for
including in a pivot facet response to the original distributed request.
|
static PivotFacetValue |
createFromNamedList(int shardNumber,
ResponseBuilder rb,
PivotFacetField parentField,
NamedList<Object> pivotData)
A recursive method to construct a new
PivotFacetValue object from
the contents of the NamedList provided by the specified shard, relative
to the specified field. |
PivotFacetField |
getChildPivot()
The
PivotFacetField corrisponding to the nested child pivot for this
PivotFacetValue . |
int |
getCount()
The count corrisponding to the value modeled by this
PivotFacetValue |
Comparable |
getValue()
The value of the asssocated field modeled by this
PivotFacetValue . |
List<String> |
getValuePath()
A recursive method that walks up the tree of pivot fields/values to build
a list of the String representations of the values that lead down to this
PivotFacetValue.
|
void |
mergeContributionFromShard(int shardNumber,
ResponseBuilder rb,
NamedList<Object> value)
Merges in the count contributions from the specified shard for each.
|
boolean |
shardHasContributed(int shardNum)
A NON-Recursive method indicating if the specified shard has already
contributed to the count for this value.
|
String |
toString() |
public Comparable getValue()
PivotFacetValue
.
May be null if this PivotFacetValue
models the count for docs
"missing" the field value.FacetParams.FACET_MISSING
public int getCount()
PivotFacetValue
public PivotFacetField getChildPivot()
PivotFacetField
corrisponding to the nested child pivot for this
PivotFacetValue
. May be null if this object is the leaf of a pivot.public List<String> getValuePath()
PivotFacetField.getValuePath()
public static PivotFacetValue createFromNamedList(int shardNumber, ResponseBuilder rb, PivotFacetField parentField, NamedList<Object> pivotData)
PivotFacetValue
object from
the contents of the NamedList
provided by the specified shard, relative
to the specified field.
If the NamedList
contains data for a child PivotFacetField
that will be recursively built as well.shardNumber
- the id of the shard that provided this datarb
- The response builder of the current requestparentField
- the parent field in the current pivot associated with this valuepivotData
- the data from the specified shard for this pivot valuePivotFacetField.createFromListOfNamedLists(int, org.apache.solr.handler.component.ResponseBuilder, org.apache.solr.handler.component.PivotFacetValue, java.util.List<org.apache.solr.common.util.NamedList<java.lang.Object>>)
public boolean shardHasContributed(int shardNum)
public NamedList<Object> convertToNamedList()
public void mergeContributionFromShard(int shardNumber, ResponseBuilder rb, NamedList<Object> value)
PivotFacetField.contributeFromShard(int, org.apache.solr.handler.component.ResponseBuilder, java.util.List<org.apache.solr.common.util.NamedList<java.lang.Object>>)
,
PivotFacetField.createFromListOfNamedLists(int, org.apache.solr.handler.component.ResponseBuilder, org.apache.solr.handler.component.PivotFacetValue, java.util.List<org.apache.solr.common.util.NamedList<java.lang.Object>>)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.