### Description

This is a followup to #85926.

As part of the ingest processing pipeline, we call `CollectionUtils.ensureNoSelfReferences(...)` to ensure that a script processor didn't accidentally introduce a circular object. However, this check is only necessary if we know there was the potential for a circular option, which can only happen with either a custom processor (a plugin where we have no control), or a script processor. We should be able to only call this sanity check if we know we need it, rather than for every document.
server/src/main/java/org/elasticsearch/action/index/IndexRequest.java
autoGeneratedTimestamp = Math.max(0, System.currentTimeMillis());
        String uid = UUIDs.base64UUID();
        id(uid);
    }
    /**
     * Resets this <code>IndexRequest</code> class, so that in case this instance can be used by the bulk/index action
     * if it was already used before. For example if retrying a retryable failure.
     */
    public void reset() {
        autoGeneratedTimestamp = UNSET_AUTO_GENERATED_TIMESTAMP;
    }
    public void checkAutoIdWithOpTypeCreateSupportedByVersion(Version version) {
        if (id == null && opType == OpType.CREATE && version.before(Version.V_7_5_0)) {
            throw new IllegalArgumentException(
                "optype create not supported for indexing requests without explicit id until all nodes " + "are on version 7.5.0 or higher"
            );
        }
    }
    @Override
    public void writeTo(StreamOutput out) throws IOException {
        checkAutoIdWithOpTypeCreateSupportedByVersion(out.getVersion());
        super.writeTo(out);
        writeBody(out);
    }
    @Override
    public void writeThin(StreamOutput out) throws IOException {
        checkAutoIdWithOpTypeCreateSupportedByVersion(out.getVersion());
        super.writeThin(out);
        writeBody(out);
    }