### CI Link

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+main+periodic+example-plugins/268/console

### Repro line

gradlew :rescore:compileJava

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

Looks like a regression caused by https://github.com/elastic/elasticsearch/pull/88735

/CC @jdconrad 
plugins/examples/rescore/src/main/java/org/elasticsearch/example/rescore/ExampleRescoreBuilder.java
topDocs.scoreDocs[i].score *= data.nextValue();
                }
            }
            
            Arrays.sort(topDocs.scoreDocs, (a, b) -> {
                if (a.score > b.score) {
                    return -1;
                }
                if (a.score < b.score) {
                    return 1;
                }
                
                return a.doc - b.doc;
            });
            return topDocs;
        }
        @Override
        public Explanation explain(int topLevelDocId, IndexSearcher searcher, RescoreContext rescoreContext,
                Explanation sourceExplanation) throws IOException {
            ExampleRescoreContext context = (ExampleRescoreContext) rescoreContext;
            
            return Explanation.match(context.factor, "test", singletonList(sourceExplanation));
        }
    }
    @Override
    public Version getMinimalSupportedVersion() {
        return Version.V_EMPTY;
    }
}