Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"query": {
"bool": {
"must_not": [],
"should": [],
"must": [
{
"term": {
"fanscore.page_id": "30596038768"
}
},
{
"match_all": {}
}
]
}
},
"page_id": "30596038768",
"sort": {
"last_activity": "desc"
},
"from": 0,
"size": 20,
"facets": {
"public_profile_count": {
"terms": {
"field": "has_public_profile"
}
},
"fan_score": {
"terms": {
"field": "fan_score"
}
},
"engagement_score": {
"terms": {
"field": "engagement_score"
}
},
"influence_score": {
"terms": {
"field": "influence_score"
}
},
"has_usable_email": {
"terms": {
"field": "has_usable_email"
}
},
"private_profile_count": {
"terms": {
"field": "has_private_profile"
}
},
"gender": {
"terms": {
"field": "gender"
}
},
"location": {
"terms": {
"script_field": "_source[\"location\"]"
}
},
"language": {
"terms": {
"script_field": "_source[\"language\"]"
}
},
"male_age_range": {
"range": {
"field": "age",
"ranges": [
{
"from": 13,
"to": 17
},
{
"from": 18,
"to": 24
},
{
"from": 25,
"to": 34
},
{
"from": 35,
"to": 44
},
{
"from": 45,
"to": 54
},
{
"from": 55,
"to": 64
},
{
"from": 65
}
]
},
"facet_filter": {
"term": {
"gender": "male"
}
}
},
"female_age_range": {
"range": {
"field": "age",
"ranges": [
{
"from": 13,
"to": 17
},
{
"from": 18,
"to": 24
},
{
"from": 25,
"to": 34
},
{
"from": 35,
"to": 44
},
{
"from": 45,
"to": 54
},
{
"from": 55,
"to": 64
},
{
"from": 65
}
]
},
"facet_filter": {
"term": {
"gender": "female"
}
}
},
"top_category_score_stats": {
"terms_stats": {
"key_field": "top_categories_with_scores.name.na",
"value_field": "top_categories_with_scores.score"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment