Queries are very slow

I have this query which took 38 seconds to execute.
{
"size": 10000,
"timeout": "30089ms",
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [{
"terms": {
"detail.status": ["ACTIVE"],
"boost": 1.0
}
}, {
"terms": {
"partner_id": [585],
"boost": 1.0
}
}],
"filter": [{
"terms": {
"location_id": [1774375, 1774233, 4197510, 1773807, 1884914, 1773626, 1774004, 1774349, 1773494, 1773948, 1774401, 1773791, 1773484, 1773442, 1774209, 1774021, 1773483, 1773702, 2781703, 8809917],
"boost": 1.0
}
}],
"adjust_pure_negative": true,
"boost": 1.0
}
},
"boost": 1.0
}
},
"sort": [{
"review_date": {
"order": "desc",
"missing": "_last"
}
}]
}

All the queries with size 10000 will take some time but this took way too much longer.
Any suggestions on improving this query please

Can you share the response?
Just remove the 9999 hits and only keep one.
But run it with size:10000.

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.