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 ofAnalyticsExpression
s.
-
-
Constructor Summary
Constructors Constructor Description ExpressionCalculator(Iterable<AnalyticsExpression> expressions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResults(Map<String,Object> response)
Calculate results for the list ofAnalyticsExpression
s and add them to the given response.Map<String,Object>
getResults()
Calculate results for the list ofAnalyticsExpression
s.
-
-
-
Constructor Detail
-
ExpressionCalculator
public ExpressionCalculator(Iterable<AnalyticsExpression> expressions)
-
-
Method Detail
-
getResults
public Map<String,Object> getResults()
Calculate results for the list ofAnalyticsExpression
s.NOTE: This method can, and is, called multiple times to generate different responses.
The results are determined by whichReductionCollectionManager.ReductionDataCollection
is passed to theReductionCollectionManager.setData(org.apache.solr.analytics.function.ReductionCollectionManager.ReductionDataCollection)
method of theReductionCollectionManager
managing the reduction for the list ofAnalyticsExpression
s.- Returns:
- a
NamedList
containing the results
-
addResults
public void addResults(Map<String,Object> response)
Calculate results for the list ofAnalyticsExpression
s 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.ReductionDataCollection
is passed to theReductionCollectionManager.setData(org.apache.solr.analytics.function.ReductionCollectionManager.ReductionDataCollection)
method of theReductionCollectionManager
managing the reduction for the list ofAnalyticsExpression
s.- Parameters:
response
- the response to add the results map to.
-
-