Skip to content

Instantly share code, notes, and snippets.

@jpotts
Created August 30, 2014 21:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jpotts/eed1da4f2dfa560a9bb1 to your computer and use it in GitHub Desktop.
Save jpotts/eed1da4f2dfa560a9bb1 to your computer and use it in GitHub Desktop.
Elasticsearch filtered query template that can be used in a JMeter test
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"bool": {
"must": [
{
"term": {
"pageId": "${__eval(${PAGE_ID})}"
}
},
{
"terms": {
"geoCode": ["${__eval(${GEO_CODE})}","all"]
}
},
{
"range": {
"pubDate": {
"le": "${__eval(${PUB_DATE})}"
}
}
},
{
"range": {
"expDate": {
"gt": "${__eval(${PUB_DATE})}"
}
}
}
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment