Skip to content

Instantly share code, notes, and snippets.

@ArFeRR
Created July 11, 2014 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ArFeRR/f69ebe24ddc543b7bffd to your computer and use it in GitHub Desktop.
Save ArFeRR/f69ebe24ddc543b7bffd to your computer and use it in GitHub Desktop.
curl -XGET http://localhost:9200/test/prodtest/_search -d '{"query":
{
"filtered":{
"filter":{
"nested":{
"path":"productsOptionValues",
"filter":{
"and":[
{
"or":[
{
"and":[
{
"term":{
"productsOptionValues.productOption":"weight"
}
},
{
"term":{
"productsOptionValues.value":"2,9 kg"
}
}
]
}
]
},
{
"or":[
{
"and":[
{
"term":{
"productsOptionValues.productOption":"resolution"
}
},
{
"term":{
"productsOptionValues.value":"1600x900"
}
}
]
},
{
"and":[
{
"term":{
"productsOptionValues.productOption":"resolution"
}
},
{
"term":{
"productsOptionValues.value":"1920x1080"
}
}
]
}
]
}
]
}
}
}
}
}}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment