Class ExpressionCalculator
- java.lang.Object
-
- org.apache.solr.analytics.function.ExpressionCalculator
-
public class ExpressionCalculator extends Object
A class used to generate results for a list ofAnalyticsExpressions.
-
-
Constructor Summary
Constructors Constructor Description ExpressionCalculator(Iterable<AnalyticsExpression> expressions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResults(Map<String,Object> response)Calculate results for the list ofAnalyticsExpressions and add them to the given response.Map<String,Object>getResults()Calculate results for the list ofAnalyticsExpressions.
-
-
-
Constructor Detail
-
ExpressionCalculator
public ExpressionCalculator(Iterable<AnalyticsExpression> expressions)
-
-
Method Detail
-
getResults
public Map<String,Object> getResults()
Calculate results for the list ofAnalyticsExpressions.NOTE: This method can, and is, called multiple times to generate different responses.
The results are determined by whichReductionCollectionManager.ReductionDataCollectionis passed to theReductionCollectionManager.setData(org.apache.solr.analytics.function.ReductionCollectionManager.ReductionDataCollection)method of theReductionCollectionManagermanaging the reduction for the list ofAnalyticsExpressions.- Returns:
- a
NamedListcontaining the results
-
addResults
public void addResults(Map<String,Object> response)
Calculate results for the list ofAnalyticsExpressions and add them to the given response.NOTE: This method can, and is, called multiple times to generate different responses.
The results are determined by whichReductionCollectionManager.ReductionDataCollectionis passed to theReductionCollectionManager.setData(org.apache.solr.analytics.function.ReductionCollectionManager.ReductionDataCollection)method of theReductionCollectionManagermanaging the reduction for the list ofAnalyticsExpressions.- Parameters:
response- the response to add the results map to.
-
-