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 classPivotNode.PivotBranch.PivotDataPair<T>Contains pivot data forPivotNode.PivotBranchclasses.-
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 voidaccept(String pivotValue)protected voidexportPivotValue(DataOutput output, PivotNode.PivotBranch.PivotDataPair<T> pivotData)Export the given pivot data, containingReductionDataand 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 voidimportPivotValue(DataInput input, String pivotValue)Import the next pivot value's set ofReductionDataand children'sReductionDataif they exist.voidsetExpressionCalculator(ExpressionCalculator expressionCalculator)Set theExpressionCalculatorthat calculates the collection of the expressions requested for this facet.voidsetReductionCollectionManager(ReductionCollectionManager collectionManager)Set theReductionCollectionManagerthat 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:AnalyticsFacetSet theReductionCollectionManagerthat manages the collection of the expressions calculated with this facet.- Overrides:
setReductionCollectionManagerin classAnalyticsFacet- Parameters:
collectionManager- The manager for relevant expressions
-
setExpressionCalculator
public void setExpressionCalculator(ExpressionCalculator expressionCalculator)
Description copied from class:AnalyticsFacetSet theExpressionCalculatorthat calculates the collection of the expressions requested for this facet.- Overrides:
setExpressionCalculatorin 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:PivotNodeImport the next pivot value's set ofReductionDataand children'sReductionDataif they exist.- Specified by:
importPivotValuein 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:PivotNodeExport the given pivot data, containingReductionDataand pivot children if they exist.- Specified by:
exportPivotValuein 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:PivotNodeCreate the response of the facet to be returned in the overall analytics response.- Specified by:
getPivotedResponsein classPivotNode<PivotNode.PivotBranch.PivotDataPair<T>>- Parameters:
pivot- the pivot to create a response for- Returns:
- the response of the facet
-
-