philomena/config/aggregation.json

90 lines
1.7 KiB
JSON

{
"comments": {
"aggs": {
"deleted": {
"filter": {
"term": {
"hidden_from_users": true
}
}
},
"last_24h": {
"filter": {
"range": {
"posted_at": {
"gt": "now-24h"
}
}
}
}
},
"track_total_hits": true
},
"images": {
"aggs": {
"deleted": {
"filter": {
"term": {
"hidden_from_users": true
}
}
},
"non_deleted": {
"aggs": {
"all_time": {
"date_histogram": {
"field": "created_at",
"calendar_interval": "day"
}
},
"avg_comments": {
"avg": {
"field": "comment_count"
}
},
"faves_gt_0": {
"filter": {
"range": {
"faves": {
"gt": 0
}
}
}
},
"last_24h": {
"filter": {
"range": {
"created_at": {
"gt": "now-24h"
}
}
}
},
"score_gt_0": {
"filter": {
"range": {
"score": {
"gt": 0
}
}
}
},
"score_lt_0": {
"filter": {
"range": {
"score": {
"lt": 0
}
}
}
}
},
"filter": {
"term": {
"hidden_from_users": false
}
}
}
}
}
}