Hi,
How should this expression be written as a query:
(attributes.id = 14 OR attributes.id = 15) AND (attributes.id = 4843 OR attributes.id = 4859)
The nested object looks like this:
{
"attributes":[
{
"id":14,
"type":"color",
"name":"Sort",
"version":1
},
{
"id":15,
"type":"color",
"name":"Sølv",
"version":1
},
{
"id":2031,
"type":"brand",
"name":"Jimmy Choo",
"version":1
},
{
"id":4843,
"type":"size",
"name":"36x28",
"version":1
},
{
"id":4859,
"type":"size",
"name":"38x36",
"version":1
},
{
"id":4927,
"type":"size",
"name":"60J",
"version":1
},
{
"id":4958,
"type":"size",
"name":"75F",
"version":1
}
]
}
I've tried using this query - among many - without any luck:
{
"query":{
"nested":{
"path":"attributes",
"query":{
"bool":{
"should":[
{
"terms":{
"attributes.id":[
14,
15
]
}
},
{
"terms":{
"attributes.id":[
4843,
4859
]
}
}
],
"minimum_should_match":2
}
}
}
}
}
Any help would appreciated.