Package org.apache.solr.analytics.facet
Class PivotNode.PivotBranch<T>
- java.lang.Object
-
- org.apache.solr.analytics.facet.AnalyticsFacet
-
- org.apache.solr.analytics.facet.SortableFacet
-
- org.apache.solr.analytics.facet.PivotNode<PivotNode.PivotBranch.PivotDataPair<T>>
-
- org.apache.solr.analytics.facet.PivotNode.PivotBranch<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
PivotNode.PivotBranch.PivotDataPair<T>
Contains pivot data forPivotNode.PivotBranch
classes.-
Nested classes/interfaces inherited from class org.apache.solr.analytics.facet.PivotNode
PivotNode.PivotBranch<T>, PivotNode.PivotLeaf
-
Nested classes/interfaces inherited from class org.apache.solr.analytics.facet.SortableFacet
SortableFacet.FacetBucket, SortableFacet.FacetSortSpecification
-
-
Field Summary
-
Fields inherited from class org.apache.solr.analytics.facet.PivotNode
currentPivot
-
Fields inherited from class org.apache.solr.analytics.facet.SortableFacet
sort
-
Fields inherited from class org.apache.solr.analytics.facet.AnalyticsFacet
collectionManager, expressionCalculator, name, reductionData
-
-
Constructor Summary
Constructors Constructor Description PivotBranch(String name, StringValueStream expression, PivotNode<T> childPivot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(String pivotValue)
protected void
exportPivotValue(DataOutput output, PivotNode.PivotBranch.PivotDataPair<T> pivotData)
Export the given pivot data, containingReductionData
and pivot children if they exist.Iterable<Map<String,Object>>
getPivotedResponse(Map<String,PivotNode.PivotBranch.PivotDataPair<T>> pivot)
Create the response of the facet to be returned in the overall analytics response.protected void
importPivotValue(DataInput input, String pivotValue)
Import the next pivot value's set ofReductionData
and children'sReductionData
if they exist.void
setExpressionCalculator(ExpressionCalculator expressionCalculator)
Set theExpressionCalculator
that calculates the collection of the expressions requested for this facet.void
setReductionCollectionManager(ReductionCollectionManager collectionManager)
Set theReductionCollectionManager
that manages the collection of the expressions calculated with this facet.-
Methods inherited from class org.apache.solr.analytics.facet.PivotNode
addFacetValueCollectionTargets, exportPivot, importPivot
-
Methods inherited from class org.apache.solr.analytics.facet.SortableFacet
applyOptions, createOldResponse, createResponse, getSort, setSort
-
Methods inherited from class org.apache.solr.analytics.facet.AnalyticsFacet
exportFacetValue, exportShardData, getName, importFacetValue, importShardData
-
-
-
-
Constructor Detail
-
PivotBranch
public PivotBranch(String name, StringValueStream expression, PivotNode<T> childPivot)
-
-
Method Detail
-
setReductionCollectionManager
public void setReductionCollectionManager(ReductionCollectionManager collectionManager)
Description copied from class:AnalyticsFacet
Set theReductionCollectionManager
that manages the collection of the expressions calculated with this facet.- Overrides:
setReductionCollectionManager
in classAnalyticsFacet
- Parameters:
collectionManager
- The manager for relevant expressions
-
setExpressionCalculator
public void setExpressionCalculator(ExpressionCalculator expressionCalculator)
Description copied from class:AnalyticsFacet
Set theExpressionCalculator
that calculates the collection of the expressions requested for this facet.- Overrides:
setExpressionCalculator
in classAnalyticsFacet
- Parameters:
expressionCalculator
- The calculator for relevant expressions
-
accept
public void accept(String pivotValue)
-
importPivotValue
protected void importPivotValue(DataInput input, String pivotValue) throws IOException
Description copied from class:PivotNode
Import the next pivot value's set ofReductionData
and children'sReductionData
if they exist.- Specified by:
importPivotValue
in classPivotNode<PivotNode.PivotBranch.PivotDataPair<T>>
- Parameters:
input
- the bit-stream to import the reduction data frompivotValue
- the next pivot value- Throws:
IOException
- if an exception occurs while reading from the input
-
exportPivotValue
protected void exportPivotValue(DataOutput output, PivotNode.PivotBranch.PivotDataPair<T> pivotData) throws IOException
Description copied from class:PivotNode
Export the given pivot data, containingReductionData
and pivot children if they exist.- Specified by:
exportPivotValue
in classPivotNode<PivotNode.PivotBranch.PivotDataPair<T>>
- Parameters:
output
- the bit-stream to output the reduction data topivotData
- the next pivot value data- Throws:
IOException
- if an exception occurs while reading from the input
-
getPivotedResponse
public Iterable<Map<String,Object>> getPivotedResponse(Map<String,PivotNode.PivotBranch.PivotDataPair<T>> pivot)
Description copied from class:PivotNode
Create the response of the facet to be returned in the overall analytics response.- Specified by:
getPivotedResponse
in classPivotNode<PivotNode.PivotBranch.PivotDataPair<T>>
- Parameters:
pivot
- the pivot to create a response for- Returns:
- the response of the facet
-
-