### 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
public static ExampleRescoreBuilder fromXContent(XContentParser parser) {
        return PARSER.apply(parser, null);
    }
    @Override
    public RescoreContext innerBuildContext(int windowSize, SearchExecutionContext context) throws IOException {
        IndexFieldData<?> factorFieldData =
                this.factorField == null ? null : context.getForField(context.getFieldType(this.factorField));
        return new ExampleRescoreContext(windowSize, factor, factorFieldData);
    }
    @Override
    public boolean equals(Object obj) {
        if (false == super.equals(obj)) {
            return false;
        }
        ExampleRescoreBuilder other = (ExampleRescoreBuilder) obj;
        return factor == other.factor
                && Objects.equals(factorField, other.factorField);
    }
    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), factor, factorField);
    }
    float factor() {
        return factor;
    }
    @Nullable
    String factorField() {
        return factorField;
    }
    private static class ExampleRescoreContext extends RescoreContext {