I'm doing a complex query and sort returns the same results. Can anybody help me?
The query works fine returning the correct values but with or without sort option the results are the same.
Here's the search query
{
"limit": 2000,
"sort":[ "created": { "order": "desc" } ],
"filter": {
"bool": {
"must": [{
"geo_polygon": {
"location.geopoint.coordinates": {
"points": [
[-90, -90],
[-90, 90],
[90, 90],
[90, -90]
]
}
}
}, {
"term": {
"status": "active"
}
}, {
"bool": {
"should": [{
"term": {
"basic.pSubType": "kljhfgdfgvf"
}
}, {
"term": {
"basic.pSubType": "asdqwesdf"
}
}]
}
}, {
"range": {
"property.bthrms": {
"gte": 0,
"lte": 20
}
}
}, {
"bool": {
"should": [{
"term": {
"property.energy": 2
}
}, {
"term": {
"property.energy": 3
}
}]
}
}, {
"bool": {
"should": [{
"term": {
"building.bFacils": "asdqwe"
}
}, {
"term": {
"building.bFacils": "asdasd"
}
}]
}
}, {
"bool": {
"should": [{
"bool": {
"must": [{
"term": {
"basic.pSubType": "loort"
}
}, {
"range": {
"building.height": {
"gte": 6
}
}
}, {
"range": {
"property.flrNr": {
"lte": 6
}
}
}]
}
}, {
"bool": {
"must": [{
"term": {
"basic.pSubType": "eirthertr"
}
}, {
"range": {
"building.height": {
"gte": 2,
"lte": 20
}
}
}, {
"range": {
"property.flrNr": {
"gte": -5
}
}
}]
}
}]
}
}, {
"term": {
"basic.operation": "buy"
}
}, {
"range": {
"basic.price": {
"gte": 466
}
}
}, {
"range": {
"basic.priceRatio": {
"gte": 50,
"lte": 500000
}
}
}, {
"range": {
"property.surface": {
"gte": 30,
"lte": 56000
}
}
}, {
"range": {
"property.bdrms": {
"lte": 50
}
}
}]
}
}
}