Skip to content

Instantly share code, notes, and snippets.

@jrots
Created November 18, 2015 16:42
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 jrots/83c5a6edd4ff0c340128 to your computer and use it in GitHub Desktop.
Save jrots/83c5a6edd4ff0c340128 to your computer and use it in GitHub Desktop.
ES query
{
"from": 0,
"size": 23,
"_source": false,
"query": {
"bool": {
"must": {
"match_all": []
},
"filter": {
"bool": {
"must": [
{
"term": {
"gender": "female"
}
},
{
"term": {
"accountstatus": "active"
}
},
{
"terms": {
"country": [
"nl"
]
}
},
{
"range": {
"birthdate": {
"gte": "1979-11-18",
"lte": "1993-11-18"
}
}
}
],
"should": [
{
"range": {
"lastlogindate": {
"gte": "2015-10-18 00:00",
"lte": "2015-11-18 16:00"
},
"_cache": true
}
},
{
"range": {
"lastlogindate": {
"gte": "2015-11-18 16:00",
"lte": "2015-11-18 16:40"
},
"_cache": true
}
}
]
}
}
}
},
"sort": [
{
"hasavatar": "desc"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment