### 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
"id ["
                    + id
                    + "] is too long, must be no longer than "
                    + MAX_DOCUMENT_ID_LENGTH_IN_BYTES
                    + " bytes but was: "
                    + id.getBytes(StandardCharsets.UTF_8).length,
                validationException
            );
        }
        if (pipeline != null && pipeline.isEmpty()) {
            validationException = addValidationError("pipeline cannot be an empty string", validationException);
        }
        if (finalPipeline != null && finalPipeline.isEmpty()) {
            validationException = addValidationError("final pipeline cannot be an empty string", validationException);
        }
        return validationException;
    }
    @Override
    public IndicesOptions indicesOptions() {
        return IndicesOptions.strictSingleIndexNoExpandForbidClosed();
    }
    /**
     * The content type. This will be used when generating a document from user provided objects like Maps and when parsing the
     * source at index time
     */
    public XContentType getContentType() {
        return contentType;
    }
    /**
     * The id of the indexed document. If not set, will be automatically generated.