I have a query that should not match a range date (from what I understand) but it does:
{
"_score": 2,
"_source": {
"newUntil": "2019-01-14T12:45:27+00:00",
"searchWeightFactor": 1,
"active": true
},
"_explanation": {
"value": 2,
"description": "sum of:",
"details": [
{
"value": 2,
"description": "sum of",
"details": [
{
"value": 0,
"description": "sum of:",
"details": [
{
"value": 0,
"description": "match on required clause, product of:",
"details": [
{
"value": 0,
"description": "# clause",
"details": []
},
{
"value": 1,
"description": "searchStrategy:default",
"details": []
}
]
},
{
"value": 0,
"description": "match on required clause, product of:",
"details": [
{
"value": 0,
"description": "# clause",
"details": []
},
{
"value": 1,
"description": "active:true",
"details": []
}
]
}
]
},
{
"value": 2,
"description": "min of:",
"details": [
{
"value": 2,
"description": "function score, score mode [multiply]",
"details": [
{
"value": 1,
"description": "script score function, computed with script:\"Script{type=inline, lang='painless', idOrCode='return 1;', options={}, params={}}\" and parameters: \n{}",
"details": [
{
"value": 0,
"description": "_score: ",
"details": [
{
"value": 0,
"description": "sum of:",
"details": [
{
"value": 0,
"description": "match on required clause, product of:",
"details": [
{
"value": 0,
"description": "# clause",
"details": []
},
{
"value": 1,
"description": "searchStrategy:default",
"details": []
}
]
},
{
"value": 0,
"description": "match on required clause, product of:",
"details": [
{
"value": 0,
"description": "# clause",
"details": []
},
{
"value": 1,
"description": "active:true",
"details": []
}
]
}
]
}
]
}
]
},
{
"value": 2,
"description": "function score, product of:",
"details": [
{
"value": 1,
"description": "match filter: newUntil:[2019-05-17T21:29:20+00:00 TO *]",
"details": []
},
{
"value": 2,
"description": "product of:",
"details": [
{
"value": 1,
"description": "constant score 1.0 - no function provided",
"details": []
},
{
"value": 2,
"description": "weight",
"details": []
}
]
}
]
},
{
"value": 1,
"description": "field value function: none(doc['searchWeightFactor'].value * factor=1.0)",
"details": []
}
]
},
{
"value": 3.4028235e+38,
"description": "maxBoost",
"details": []
}
]
}
]
},
{
"value": 0,
"description": "match on required clause, product of:",
"details": [
{
"value": 0,
"description": "# clause",
"details": []
},
{
"value": 1,
"description": "DocValuesFieldExistsQuery [field=_primary_term]",
"details": []
}
]
}
]
}
}
The part I causing issue is this part:
match filter: newUntil:[2019-05-17T21:29:20+00:00 TO *]
It's executed like it match but you can see the source and the value is
"newUntil": "2019-01-14T12:45:27+00:00",
so it should not match !
I am using Elastic Search via Amazon 6.3