Skip to content

Instantly share code, notes, and snippets.

@ArFeRR
Created March 17, 2015 13:27
Show Gist options
  • Save ArFeRR/1ea0bb5be124dfb1d5db to your computer and use it in GitHub Desktop.
Save ArFeRR/1ea0bb5be124dfb1d5db to your computer and use it in GitHub Desktop.
{
"query":{
"filtered":{
"filter":{
"bool":{
"must":[
{
"range":{
"skus.stock":{
"gt":0,
"lt":999999
}
}
},
{
"term":{
"categories.id":[
93449,
96790,
63025,
63406,
97253,
62714,
63412
]
}
},
{
"exists":{
"field":"brand.id"
}
},
{
"term":{
"isActive":true
}
},
{
"term":{
"notShowInCatalog":false
}
}
]
}
}
}
},
"aggs":{
"option_cnt":{
"terms":{
"field":"optionValues.id",
"size":100000
}
}
},
"size":1,
"fields":[
"id"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment