2016-09-05 17:16:23 +02:00
|
|
|
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
|
|
|
|
|
|
|
one:
|
2017-01-03 13:35:36 +01:00
|
|
|
query: '{"size":0, "aggregations":{"%{aggs_name}":{"sum":{"field":"bookable_hours"}}}, "query":{"bool":{"must":[{"range":{"start_at":{"gte":"%{start_date}", "lte":"%{end_date}"}}}, {"match":{"available_type":"machines"}}]}}}'
|
2016-09-05 17:16:23 +02:00
|
|
|
statistic_type_id: 2
|
|
|
|
field: "available_hours"
|
2016-09-06 14:21:52 +02:00
|
|
|
es_index: "fablab"
|
|
|
|
es_type: "availabilities"
|
2022-11-17 16:35:59 +01:00
|
|
|
|
|
|
|
two:
|
|
|
|
query: '{"size":0, "aggregations":{"%{aggs_name}":{"sum":{"field":"nb_total_places"}}}, "query":{"bool":{"must":[{"range":{"start_at":{"gte":"%{start_date}", "lte":"%{end_date}"}}}, {"match":{"available_type":"training"}}]}}}'
|
|
|
|
statistic_type_id: 3
|
|
|
|
field: "available_tickets"
|
|
|
|
es_index: "fablab"
|
|
|
|
es_type: "availabilities"
|
|
|
|
|
|
|
|
three:
|
|
|
|
query: '{"size":0, "aggregations":{"%{aggs_name}":{"avg":{"field":"ca", "script":"BigDecimal.valueOf(_value).setScale(1, RoundingMode.HALF_UP)", "missing": 0}}}, "query":{"bool":{"must":[{"range":{"date":{"gte":"%{start_date}", "lte":"%{end_date}"}}}]}}}'
|
|
|
|
statistic_type_id: 15
|
|
|
|
field: "average_cart"
|
|
|
|
es_index: "stats"
|
|
|
|
es_type: "order"
|