Skip to content

Instantly share code, notes, and snippets.

@morus12
Created November 20, 2013 10:46
Show Gist options
  • Save morus12/7561158 to your computer and use it in GitHub Desktop.
Save morus12/7561158 to your computer and use it in GitHub Desktop.
{
"size": 0,
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"and": [
{
"exists": {
"field": "post_chat.survey_id"
}
},
{
"numeric_range": {
"post_chat.date": {
"from": "2013-11-18T23:00:00Z",
"to": "2020-12-12T22:59:59Z"
}
}
},
{
"terms": {
"chat.skill_id": [
"4"
]
}
}
]
}
}
},
"facets": {
"surveys": {
"terms": {
"field": "post_chat.survey_id",
"size": 100
}
},
"answers": {
"nested": "post_chat.group_fields",
"terms": {
"field": "post_chat.group_fields.id_and_radio_value",
"size": 500000
}
}
}
}
{
"took": 9,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 21,
"max_score": 1.0,
"hits": []
},
"facets": {
"surveys": {
"_type": "terms",
"missing": 0,
"total": 21,
"other": 0,
"terms": [{
"term": "13578301458030611",
"count": 21
}]
},
"answers": {
"_type": "terms",
"missing": 0,
"total": 99,
"other": 0,
"terms": [{
"term": "135783014580402767:0",
"count": 14
}, {
"term": "135783014580409684:0",
"count": 13
}, {
"term": "135783014580403500:0",
"count": 13
}, {
"term": "135783014580402258:0",
"count": 13
}, {
"term": "135783014580401450:0",
"count": 13
}, {
"term": "135783014580409684:1",
"count": 6
}, {
"term": "135783014580402767:1",
"count": 6
}, {
"term": "135783014580402258:1",
"count": 6
}, {
"term": "135783014580401450:1",
"count": 6
}, {
"term": "135783014580403500:1",
"count": 3
}, {
"term": "135783014580403500:3",
"count": 2
}, {
"term": "135783014580409684:2",
"count": 1
}, {
"term": "135783014580403500:4",
"count": 1
}, {
"term": "135783014580403500:2",
"count": 1
}, {
"term": "135783014580402258:3",
"count": 1
}]
}
}
}
{
"filter": {
"and": [
{
"numeric_range": {
"chat.start_date": {
"from": "2013-11-18T23:00:00Z",
"to": "2030-11-19T00:00:00Z"
}
}
},
{
"nested": {
"filter": {
"term": {
"post_chat.group_fields.id_and_radio_value": "135783014580402258:3"
}
},
"path": "post_chat.group_fields"
}
}
]
},
"size": 10
}
{
"took": 31,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment