public class PivotFacet extends FacetComponent.FacetBase
FacetParams.FACET_PIVOT
param, which may contain multiple nested fields.
This class is also used to coordinate the refinement requests needed from various
shards when doing processing a distributed requestModifier and Type | Field and Description |
---|---|
BitSet |
knownShards |
static String |
REFINE_PARAM
Local param used to indicate that refinements are required on a pivot.
|
Constructor and Description |
---|
PivotFacet(ResponseBuilder rb,
String facetStr) |
Modifier and Type | Method and Description |
---|---|
void |
addRefinement(int shardNumber,
PivotFacetValue value)
Tracks that the specified shard needs to be asked to refine the specified
PivotFacetValue |
List<PivotFacetValue> |
getQueuedRefinements(int shardNumber)
An immutable List of the
PivotFacetValue s that need to be
refined for this pivot. |
List<NamedList<Object>> |
getTrimmedPivotsAsListOfNamedLists()
A recursive method for generating
NamedLists for this pivot
suitable for including in a pivot facet response to the original distributed request. |
boolean |
isRefinementsRequired()
If true, then additional refinement requests are needed to flesh out the correct
counts for this Pivot
|
void |
mergeResponseFromShard(int shardNumber,
ResponseBuilder rb,
List<NamedList<Object>> response)
Recursively merges the response from the specified shard, tracking the known shards.
|
void |
queuePivotRefinementRequests()
A recursive method for determining which
PivotFacetValue s need to be
refined for this pivot. |
void |
removeAllRefinementsForShard(int shardNumber)
Clears the list of queued refinements for the specified shard
|
String |
toString() |
getExcludeTags, getKey, getTags, getThreadCount, getType
public static final String REFINE_PARAM
public final BitSet knownShards
public PivotFacet(ResponseBuilder rb, String facetStr)
public void addRefinement(int shardNumber, PivotFacetValue value)
PivotFacetValue
getQueuedRefinements(int)
public List<PivotFacetValue> getQueuedRefinements(int shardNumber)
PivotFacetValue
s that need to be
refined for this pivot. Once these refinements have been processed,
the caller should clear them using removeAllRefinementsForShard(int)
addRefinement(int, org.apache.solr.handler.component.PivotFacetValue)
,
removeAllRefinementsForShard(int)
public void removeAllRefinementsForShard(int shardNumber)
public boolean isRefinementsRequired()
getQueuedRefinements(int)
public List<NamedList<Object>> getTrimmedPivotsAsListOfNamedLists()
NamedLists
for this pivot
suitable for including in a pivot facet response to the original distributed request.public void queuePivotRefinementRequests()
PivotFacetValue
s need to be
refined for this pivot.public void mergeResponseFromShard(int shardNumber, ResponseBuilder rb, List<NamedList<Object>> response)
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.