Skip to content

Instantly share code, notes, and snippets.

@gpstathis
Created June 8, 2016 05:07
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 gpstathis/f96c048d0afe8f2bfce4753ffc9d555b to your computer and use it in GitHub Desktop.
Save gpstathis/f96c048d0afe8f2bfce4753ffc9d555b to your computer and use it in GitHub Desktop.
Activity stream query
{
"from": 0,
"size": 25,
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [
{
"has_parent": {
"query": {
"terms": {
"itype": [
"person"
]
}
},
"parent_type": "influencer"
}
},
{
"has_parent": {
"query": {
"term": {
"tags": "bf0c5985e9644cf3:infs/acct/"
}
},
"parent_type": "influencer"
}
},
{
"has_parent": {
"query": {
"term": {
"tags": "bf0c5985e9644cf3:infs/proj/21694/"
}
},
"parent_type": "influencer"
}
},
{
"range": {
"publishedDate": {
"from": "2015-04-29T00:00:00-0400",
"to": "2016-06-02T23:59:59-0400",
"include_lower": true,
"include_upper": true
}
}
}
]
}
}
}
},
"fields": "*",
"sort": [
{
"publishedDate": {
"order": "desc"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment