Friends:
I have the following document a structural hierarchy, indexed.
{
"id":"abc",
"nodeCount":12,
"edgeCount":11,
"degreesCountMap":[
{
"size":2,
"count":10
},
{
"size":3,
"count":2
}
]
}
Then I ran the query:
{
"query":{
"bool":{
"must":[
{
"range":{
"degreesCountMap.size":{
"from":3
},
"degreesCountMap.count":{
"from":10
}
}
}
]
}
}
}
Expected a no match because I thought ES will try to match {"size":3,"count":2}
or {"size":2,"count":10}
however, the document was matched. I assume it matched size:3 from {"size":3,"count":2}
and count:10 from another {"size":2,"count":10}
. My question: Is there a way to force the match to happen with one {...}
.
I have also tried the query below and found the same result:
{
"query":{
"bool":{
"must":[
{
"range":{
"degreesCountMap.size":{
"from":3
}
}
},
{
"range":{
"degreesCountMap.count":{
"from":10
}
}
}
]
}
}
}
I will appreciate your help.