close

Filter

Elastic Social Manual / Version 2110

Table Of Contents

4.6 Counters

This section describes the configuration and usage of Counters in CoreMedia Elastic Social.

The following CounterServices are available in Elastic Social:

  • CounterService: for simple counters with a given name and value which can increment or decrement a value.

  • HistogramCounterService: for counters which also contain a date. This is necessary if you want to determine a counter value for a certain time period, for instance the most commented articles in the last week.

  • AverageCounterService: for counters which can increment and decrement two values, the total sum and the number of samples to calculate an arithmetic mean, for instance if you want to calculate the average rating. It handles counters with and without a date.

Counters are stored in the database [prefix]_[tenant]_counters. The following collections contain counter values:

Name Description
counters Counters with aggregated value
histogram_counters Histogram counters with date and sum
average_counters Average counters with aggregated sum and quantity
average_histogram_counters Average counters with date, sum and quantity

Table 4.4. Counter collections


Each counter is stored aggregated with a value in the counters collection.

Each histogram counter is stored separately with sum and date in the histogram_counters collection and aggregated with value in the counters collection.

Each average counter is stored separately with sum, quantity and date in the average_histogram_counters collection and aggregated with sum and quantity in the average_counters collection.

A sorted list for highest values for simple counters without a date can easily be calculated using a simple query. Lists which need to consider an average value or a certain time interval need to be aggregated using map and reduce jobs.

The following collections contain these aggregated sorted lists of counter values, for instance the most commented targets in a given time interval:

Name Description
highest_average_counters The highest average counters without time limitation (infinity)
highest_average_counters_[INTERVAL] The highest average counters for the given time interval for instance the last week ("LAST_WEEK")
highest_histogram_counters_[INTERVAL] The highest histogram counters for the given time interval for instance the last week ("LAST_WEEK")

Table 4.5. Aggregated counter collections


All aggregated counter lists are updated in given time intervals that are configurable (counters.aggregation-interval-milliseconds[.interval], see Table 3.36, “Counters Properties” in Deployment Manual).

Counters can also be refreshed manually using JMX, see Section 3.3.4, “Refresh counters”.

The following tables list the predefined counters in Elastic Social which you can access via the counter services.

The following counters are implemented in CoreMedia Elastic Social:

Name Description
user:number_of_logins The number of logins of the user
comments:approvedComments Number of approved comments
comments:rejectedComments Number of rejected comments
reviews:approvedReviews Number of approved reviews
reviews:rejectedReviews Number of rejected reviews
complaints:comments Number of complaints for a comment
complaints:users Number of complaints for a user

Table 4.6. Counters used in CoreMedia Elastic Social


The following histogram counters are implemented in CoreMedia Elastic Social:

Name Description
comments:mostCommented[:category] Most commented target [per category]
reviews:mostReviewed[:category] Most reviewed target [per category]
share[:category] Number of shares for a target [per category]
like[:category] The number of likes for a target [per category]
author:number_of_likes Number of likes from the author
author:number_of_ratings Number of ratings from the author
author:number_of_reviews Number of reviews from the author

Table 4.7. Histogram counters


The following average counters are implemented in CoreMedia Elastic Social:

Name Description
rating[:category] The number of ratings for a target [per category]

Table 4.8. Average counters


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.