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
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidDetermine which facet values match the current document.org.apache.solr.common.util.NamedList<Object> Create the old olap-style response of the facet to be returned in the overall analytics response.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
-
Constructor Details
-
PivotFacet
-
-
Method Details
-
setReductionCollectionManager
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
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
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
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
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
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
-