Search in sources :

Example 6 with SumMetric

use of org.apache.solr.client.solrj.io.stream.metrics.SumMetric in project lucene-solr by apache.

the class StreamExpressionToExpessionTest method testSumMetric.

@Test
public void testSumMetric() throws Exception {
    Metric metric;
    String expressionString;
    // Basic test
    metric = new SumMetric(StreamExpressionParser.parse("sum(foo)"), factory);
    expressionString = metric.toExpression(factory).toString();
    assertEquals("sum(foo)", expressionString);
}
Also used : SumMetric(org.apache.solr.client.solrj.io.stream.metrics.SumMetric) MeanMetric(org.apache.solr.client.solrj.io.stream.metrics.MeanMetric) MinMetric(org.apache.solr.client.solrj.io.stream.metrics.MinMetric) CountMetric(org.apache.solr.client.solrj.io.stream.metrics.CountMetric) MaxMetric(org.apache.solr.client.solrj.io.stream.metrics.MaxMetric) Metric(org.apache.solr.client.solrj.io.stream.metrics.Metric) SumMetric(org.apache.solr.client.solrj.io.stream.metrics.SumMetric) Test(org.junit.Test)

Aggregations

CountMetric (org.apache.solr.client.solrj.io.stream.metrics.CountMetric)6 MaxMetric (org.apache.solr.client.solrj.io.stream.metrics.MaxMetric)6 MeanMetric (org.apache.solr.client.solrj.io.stream.metrics.MeanMetric)6 Metric (org.apache.solr.client.solrj.io.stream.metrics.Metric)6 MinMetric (org.apache.solr.client.solrj.io.stream.metrics.MinMetric)6 SumMetric (org.apache.solr.client.solrj.io.stream.metrics.SumMetric)6 Test (org.junit.Test)6 SolrClientCache (org.apache.solr.client.solrj.io.SolrClientCache)5 Tuple (org.apache.solr.client.solrj.io.Tuple)5 UpdateRequest (org.apache.solr.client.solrj.request.UpdateRequest)5 ModifiableSolrParams (org.apache.solr.common.params.ModifiableSolrParams)5 SolrParams (org.apache.solr.common.params.SolrParams)5 Bucket (org.apache.solr.client.solrj.io.stream.metrics.Bucket)4 FieldComparator (org.apache.solr.client.solrj.io.comp.FieldComparator)3 MultipleFieldComparator (org.apache.solr.client.solrj.io.comp.MultipleFieldComparator)3