Skip to content

Instantly share code, notes, and snippets.

@phillro
Created March 18, 2013 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phillro/803701269a1b2a384c32 to your computer and use it in GitHub Desktop.
Save phillro/803701269a1b2a384c32 to your computer and use it in GitHub Desktop.
{
"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