Hi all,
My mapping:
{
'doc': {
'sources': {
'properties': {
'depth': {
'type': 'integer'
}
}
}
}
}
I have docs like:
{'sources': [{'depth': 0}, {'depth': 3}]}
{'sources': [{'depth': 3}]}
My query:
{
"query": {
"range": {
"sources.depth": {
"gt": 2
}
}
}
}
returns above 2 documents which is expected.
But, how should I create a query to return only the second one?
I mean is there some kind of mechanism in ES query that will return me the result of such conditions?
{
"query": {
"must": {
"range": {
"sources.depth": {
"gt": 2
}
}
},
"must_not": {
"range": {
"sources.depth": {
"lte": 2
}
}
}
}
}