Hello, I have problems. When I am using nested filter in my query sorting order breaks (without nested filters works perfect )
{
"query": {
"nested": {
"path": "status",
"query": {
"bool": {
"should": [
{
"match": {
"status.isOk": true
}
}
]
}
}
}
},
"sort": [
{
"_script": {
"script": {
"source": "doc['price'].value", //example only
"lang": "painless"
},
"type": "number",
"order": "asc",
"nested": {
"path" : "params",
"filter":{
"bool": {
"must": [
{
"range": {
"params.date1": {
"from": null,
"to": "2021-09-09",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"params.date12": {
"from": "2021-09-09",
"to": null,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}
}
}
}
]
}