**Build scan:**
https://gradle-enterprise.elastic.co/s/7vcre2by7feoe/tests/:server:internalClusterTest/org.elasticsearch.search.aggregations.bucket.SignificantTermsSignificanceScoreIT/testScriptScore

**Reproduction line:**
```
./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.search.aggregations.bucket.SignificantTermsSignificanceScoreIT.testScriptScore" -Dtests.seed=3AF8B75C5D0AD4EA -Dtests.locale=es-PR -Dtests.timezone=EAT -Druntime.java=20
```

**Applicable branches:**
main

**Reproduces locally?:**
Yes

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.search.aggregations.bucket.SignificantTermsSignificanceScoreIT&tests.test=testScriptScore

**Failure excerpt:**
```
java.lang.Exception: Test abandoned because suite timeout was reached.

  at __randomizedtesting.SeedInfo.seed([3AF8B75C5D0AD4EA]:0)

```
server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java
}
            }
            """, args);
        assertThat(Strings.toString(responseBuilder), equalTo(XContentHelper.stripWhitespace(result)));
    }
    public void testPopularTermManyDeletedDocs() throws Exception {
        String settings = "{\"index.number_of_shards\": 1, \"index.number_of_replicas\": 0}";
        assertAcked(
            prepareCreate(INDEX_NAME).setSettings(settings, XContentType.JSON)
                .setMapping("text", "type=keyword", CLASS_FIELD, "type=keyword")
        );
        String[] cat1v1 = { "constant", "one" };
        String[] cat1v2 = { "constant", "uno" };
        String[] cat2v1 = { "constant", "two" };
        String[] cat2v2 = { "constant", "duo" };
        List<IndexRequestBuilder> indexRequestBuilderList = new ArrayList<>();
        indexRequestBuilderList.add(client().prepareIndex(INDEX_NAME).setId("1").setSource(TEXT_FIELD, cat1v1, CLASS_FIELD, "1"));
        indexRequestBuilderList.add(client().prepareIndex(INDEX_NAME).setId("2").setSource(TEXT_FIELD, cat1v2, CLASS_FIELD, "1"));
        indexRequestBuilderList.add(client().prepareIndex(INDEX_NAME).setId("3").setSource(TEXT_FIELD, cat2v1, CLASS_FIELD, "2"));
        indexRequestBuilderList.add(client().prepareIndex(INDEX_NAME).setId("4").setSource(TEXT_FIELD, cat2v2, CLASS_FIELD, "2"));
        indexRandom(true, false, indexRequestBuilderList);
        
        
        
        
        String[] text = cat1v1;
        indexRequestBuilderList.clear();
        for (int i = 0; i < 50; i++) {
            text = text == cat1v2 ? cat1v1 : cat1v2;
            indexRequestBuilderList.add(client().prepareIndex(INDEX_NAME).setId("1").setSource(TEXT_FIELD, text, CLASS_FIELD, "1"));