Class PivotFacet
java.lang.Object
org.apache.solr.handler.component.FacetComponent.FacetBase
org.apache.solr.handler.component.PivotFacet
Models a single instance of a "pivot" specified by a
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 request
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRefinement(int shardNumber, PivotFacetValue value) Tracks that the specified shard needs to be asked to refine the specifiedPivotFacetValuegetQueuedRefinements(int shardNumber) An immutable List of thePivotFacetValues that need to be refined for this pivot.A recursive method for generatingNamedListsfor this pivot suitable for including in a pivot facet response to the original distributed request.booleanIf true, then additional refinement requests are needed to flesh out the correct counts for this PivotvoidmergeResponseFromShard(int shardNumber, ResponseBuilder rb, List<org.apache.solr.common.util.NamedList<Object>> response) Recursively merges the response from the specified shard, tracking the known shards.voidA recursive method for determining whichPivotFacetValues need to be refined for this pivot.voidremoveAllRefinementsForShard(int shardNumber) Clears the list of queued refinements for the specified shardtoString()Methods inherited from class org.apache.solr.handler.component.FacetComponent.FacetBase
getExcludeTags, getKey, getTags, getThreadCount, getType
-
Field Details
-
REFINE_PARAM
Local param used to indicate that refinements are required on a pivot. Should also be used as the prefix for concatenating with the value to determine the name of the multi-valued param that will contain all of the values needed for refinement.- See Also:
-
knownShards
-
-
Constructor Details
-
PivotFacet
-
-
Method Details
-
addRefinement
Tracks that the specified shard needs to be asked to refine the specifiedPivotFacetValue- See Also:
-
getQueuedRefinements
An immutable List of thePivotFacetValues that need to be refined for this pivot. Once these refinements have been processed, the caller should clear them usingremoveAllRefinementsForShard(int)- Returns:
- a list of the values to refine, or an empty list.
- See Also:
-
removeAllRefinementsForShard
public void removeAllRefinementsForShard(int shardNumber) Clears the list of queued refinements for the specified shard- See Also:
-
isRefinementsRequired
public boolean isRefinementsRequired()If true, then additional refinement requests are needed to flesh out the correct counts for this Pivot- See Also:
-
getTrimmedPivotsAsListOfNamedLists
A recursive method for generatingNamedListsfor this pivot suitable for including in a pivot facet response to the original distributed request.- See Also:
-
queuePivotRefinementRequests
public void queuePivotRefinementRequests()A recursive method for determining whichPivotFacetValues need to be refined for this pivot.- See Also:
-
mergeResponseFromShard
public void mergeResponseFromShard(int shardNumber, ResponseBuilder rb, List<org.apache.solr.common.util.NamedList<Object>> response) Recursively merges the response from the specified shard, tracking the known shards.- See Also:
-
toString
-