Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ArFeRR
Created November 26, 2014 14:00
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 ArFeRR/12610c52a57dce9b0728 to your computer and use it in GitHub Desktop.
Save ArFeRR/12610c52a57dce9b0728 to your computer and use it in GitHub Desktop.
elasticsearch query, doesn't work
{
"query":{
"filtered":{
"filter":{
"bool":{
"must":[
{
"range":{
"skus.stock":{
"gt":0,
"lt":999999
}
}
},
{
"term":{
"skus.isMarkdowned":true
}
}
]
}
}
}
},
"aggs":{
"option_cnt":{
"terms":{
"field":"filterValues.productOptionValue.id",
"size":100000
}
},
"brand_cnt":{
"terms":{
"field":"brand.id",
"size":100000
}
},
"country_cnt":{
"terms":{
"field":"brand.countries.id",
"size":100000
}
},
"serie_cnt":{
"terms":{
"field":"serie.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