Skip to content

Instantly share code, notes, and snippets.

@ubethke
Created May 1, 2014 12:15
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 ubethke/ddc311dc6036c582eff6 to your computer and use it in GitHub Desktop.
Save ubethke/ddc311dc6036c582eff6 to your computer and use it in GitHub Desktop.
ES Query
GET /visitor_session/_search?pretty
{
"facets": {
"0": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"visit_date": {
"from": 1364819170260,
"to": 1397132770260
}
}
}
]
}
}
}
}
},
"2": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "ppc_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"visit_date": {
"from": 1364819170260,
"to": 1397132770260
}
}
}
]
}
}
}
}
},
"3": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "seo_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"visit_date": {
"from": 1364819170260,
"to": 1397132770260
}
}
}
]
}
}
}
}
},
"4": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "affiliate_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"visit_date": {
"from": 1364819170260,
"to": 1397132770260
}
}
}
]
}
}
}
}
},
"5": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "email_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"visit_date": {
"from": 1364819170260,
"to": 1397132770260
}
}
}
]
}
}
}
}
},
"6": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "direct_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"visit_date": {
"from": 1364819170260,
"to": 1397132770260
}
}
}
]
}
}
}
}
},
"old_0": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"visit_date": {
"from": 1333283170260,
"to": 1365596770260
}
}
}
]
}
}
}
}
},
"old_2": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "ppc_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"visit_date": {
"from": 1333283170260,
"to": 1365596770260
}
}
}
]
}
}
}
}
},
"old_3": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "seo_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"visit_date": {
"from": 1333283170260,
"to": 1365596770260
}
}
}
]
}
}
}
}
},
"old_4": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "affiliate_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"visit_date": {
"from": 1333283170260,
"to": 1365596770260
}
}
}
]
}
}
}
}
},
"old_5": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "email_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"visit_date": {
"from": 1333283170260,
"to": 1365596770260
}
}
}
]
}
}
}
}
},
"old_6": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "direct_ind: 1"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"visit_date": {
"from": 1333283170260,
"to": 1365596770260
}
}
}
]
}
}
}
}
}
},
"size": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment