Sort performance since elastic 7.16

A query that sorts by a keyword field that we have been using on elastic 7.13.2 now performs quite badly on 8.4.1. There is no change to the query or mappings. Only change is the elastic version.

This query is crucial in our data pipeline and as a result we were forced to downgrade back to 7.13.2.

Here is the query

{
    "size": 100,
    "query": {
        "bool": {
            "filter": [{
                    "term": {
                        "parentId": {
                            "value": "xxxxxxx",
                            "boost": 1.0
                        }
                    }
                }, {
                    "term": {
                        "active": {
                            "value": true,
                            "boost": 1.0
                        }
                    }
                }
            ],
            "adjust_pure_negative": true,
            "boost": 1.0
        }
    },
    "sort": [{
            "id.keyword": {
                "order": "asc"
            }
        }
    ],
    "track_total_hits": 2147483647
}

parentId and id.keyword are of type keyword and active is a boolean. Index has 9 shards and one replica in a 36 node cluster.

We use REST high level client (version 7.17.5) which generates the above query.

What could be the reason for performance degradation in elastic 8

Update: I tried all minor versions between 7.13.2 and 8.4.1 to pinpoint which version introduced this performance issue. It appears to be 7.16.0

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