public class PivotFacetField extends Object
PivotFacetValue
s which may each contain a nested
PivotFacetField
child. This PivotFacetField
may itself
be a child of a PivotFacetValue
parent.PivotFacetValue
,
PivotFacetFieldValueCollection
Modifier and Type | Field and Description |
---|---|
String |
field |
PivotFacetValue |
parentValue |
PivotFacetFieldValueCollection |
valueCollection |
Modifier and Type | Method and Description |
---|---|
void |
contributeFromShard(int shardNumber,
ResponseBuilder rb,
List<NamedList<Object>> response)
Recursively merges the contributions from the specified shard for each
PivotFacetValue represended in the response . |
List<NamedList<Object>> |
convertToListOfNamedLists()
A recursive method for generating
NamedLists from this field
suitable for including in a pivot facet response to the original distributed request. |
static PivotFacetField |
createFromListOfNamedLists(int shardNumber,
ResponseBuilder rb,
PivotFacetValue owner,
List<NamedList<Object>> pivotValues)
A recursive method to construct a new
PivotFacetField object from
the contents of the NamedList s provided by the specified shard, relative
to a parent value (if this is not the top field in the pivot hierarchy)
The associated child PivotFacetValue s will be recursively built as well. |
List<String> |
getValuePath()
A recursive method that walks up the tree of pivot fields/values to build
a list of String representations of the values that lead down to this
PivotFacetField.
|
void |
queuePivotRefinementRequests(PivotFacet pf)
A recursive method for determining which
PivotFacetValue s need to be
refined for this pivot. |
void |
sort()
Recursively sorts the collection of values associated with this field, and
any sub-pivots those values have.
|
String |
toString() |
void |
trim()
Destructive method that recursively prunes values from the data structure
based on the counts for those values and the effective sort, mincount, limit,
and offset being used for each field.
|
public final String field
public final PivotFacetValue parentValue
public final PivotFacetFieldValueCollection valueCollection
public List<String> getValuePath()
PivotFacetValue.getValuePath()
public static PivotFacetField createFromListOfNamedLists(int shardNumber, ResponseBuilder rb, PivotFacetValue owner, List<NamedList<Object>> pivotValues)
PivotFacetField
object from
the contents of the NamedList
s provided by the specified shard, relative
to a parent value (if this is not the top field in the pivot hierarchy)
The associated child PivotFacetValue
s will be recursively built as well.shardNumber
- the id of the shard that provided this datarb
- The response builder of the current requestowner
- the parent value in the current pivot (may be null)pivotValues
- the data from the specified shard for this pivot field, may be null or emptyPivotFacetValue.createFromNamedList(int, org.apache.solr.handler.component.ResponseBuilder, org.apache.solr.handler.component.PivotFacetField, org.apache.solr.common.util.NamedList<java.lang.Object>)
public void trim()
This method should only be called after all refinement is completed just prior
calling convertToListOfNamedLists()
public void sort()
public List<NamedList<Object>> convertToListOfNamedLists()
NamedLists
from this field
suitable for including in a pivot facet response to the original distributed request.public void queuePivotRefinementRequests(PivotFacet pf)
PivotFacetValue
s need to be
refined for this pivot.public void contributeFromShard(int shardNumber, ResponseBuilder rb, List<NamedList<Object>> response)
PivotFacetValue
represended in the response
.shardNumber
- the id of the shard that provided this datarb
- The response builder of the current requestresponse
- the data from the specified shard for this pivot field, may be nullPivotFacetValue.mergeContributionFromShard(int, org.apache.solr.handler.component.ResponseBuilder, org.apache.solr.common.util.NamedList<java.lang.Object>)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.