Skip to content

Instantly share code, notes, and snippets.

@arielamato
Created July 7, 2011 17:04
Show Gist options
  • Save arielamato/1069984 to your computer and use it in GitHub Desktop.
Save arielamato/1069984 to your computer and use it in GitHub Desktop.
Example query
{
"query": {
"bool" : {
"should" : {
"term" : {
"location_country_id" : 74
}
},
"should" :
{
"constant_score" : {
"filter" : {
"range" : {
"age" : {
"from" : "24",
"to" : "24"
}
}
}
}
},
"should" :
{
"constant_score" : {
"filter" : {
"range" : {
"age" : {
"from" : "24",
"to" : "25"
}
}
}
}
},
"should" :
{
"constant_score" : {
"filter" : {
"range" : {
"age" : {
"from" : "24",
"to" : "26"
}
}
}
}
},
"should" :
{
"constant_score" : {
"filter" : {
"range" : {
"age" : {
"from" : "23",
"to" : "24"
}
}
}
}
},
"should" :
{
"constant_score" : {
"filter" : {
"range" : {
"age" : {
"from" : "22",
"to" : "24"
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment