Package org.apache.solr.analytics.facet
Class PivotFacet
- java.lang.Object
-
- org.apache.solr.analytics.facet.AnalyticsFacet
-
- org.apache.solr.analytics.facet.PivotFacet
-
- All Implemented Interfaces:
StreamingFacet
public class PivotFacet extends AnalyticsFacet implements StreamingFacet
A facet that takes in multiple ValueFacet expressions and does analytics calculations over each dimension given.
-
-
Field Summary
-
Fields inherited from class org.apache.solr.analytics.facet.AnalyticsFacet
collectionManager, expressionCalculator, name, reductionData
-
-
Constructor Summary
Constructors Constructor Description PivotFacet(String name, PivotNode<?> topPivot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFacetValueCollectionTargets()Determine which facet values match the current document.org.apache.solr.common.util.NamedList<Object>createOldResponse()Create the old olap-style response of the facet to be returned in the overall analytics response.Iterable<Map<String,Object>>createResponse()Create the response of the facet to be returned in the overall analytics response.voidexportShardData(DataOutput output)Export the shard data through a bit-stream, to be imported by theAnalyticsFacet.importShardData(java.io.DataInput)method in the originating shard.voidimportShardData(DataInput input)Import the shard data from a bit-stream, exported by theAnalyticsFacet.exportShardData(java.io.DataOutput)method in the each of the collection's shards.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.AnalyticsFacet
exportFacetValue, getName, importFacetValue
-
-
-
-
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
-
addFacetValueCollectionTargets
public void addFacetValueCollectionTargets()
Description copied from interface:StreamingFacetDetermine which facet values match the current document. Add theReductionCollectionManager.ReductionDataCollections of the relevant facet values to the targets of the streamingReductionCollectionManagerso that they are updated with the current document's data.- Specified by:
addFacetValueCollectionTargetsin interfaceStreamingFacet
-
importShardData
public void importShardData(DataInput input) throws IOException
Description copied from class:AnalyticsFacetImport the shard data from a bit-stream, exported by theAnalyticsFacet.exportShardData(java.io.DataOutput)method in the each of the collection's shards.- Overrides:
importShardDatain classAnalyticsFacet- Parameters:
input- The bit-stream to import the data from- Throws:
IOException- if an exception occurs while reading from theDataInput
-
exportShardData
public void exportShardData(DataOutput output) throws IOException
Description copied from class:AnalyticsFacetExport the shard data through a bit-stream, to be imported by theAnalyticsFacet.importShardData(java.io.DataInput)method in the originating shard.- Overrides:
exportShardDatain classAnalyticsFacet- Parameters:
output- The bit-stream to output the data through- Throws:
IOException- if an exception occurs while writing to theDataOutput
-
createOldResponse
public org.apache.solr.common.util.NamedList<Object> createOldResponse()
Description copied from class:AnalyticsFacetCreate the old olap-style response of the facet to be returned in the overall analytics response.- Overrides:
createOldResponsein classAnalyticsFacet- Returns:
- the response of the facet
-
createResponse
public Iterable<Map<String,Object>> createResponse()
Description copied from class:AnalyticsFacetCreate the response of the facet to be returned in the overall analytics response.- Overrides:
createResponsein classAnalyticsFacet- Returns:
- the response of the facet
-
-