Transforms can be configured to search incredibly broad index patterns. These cause the lower level actions used by transforms to iterate huge numbers of shards unless measures are taken to restrict which shards are considered using information available in cluster state.

Anywhere where transforms calls an action that iterates shards it must use the `index_filter` functionality of that action to reduce scope. Calls to be changed:

- [x] Field caps
- [x] Creating PIT readers - requires #99740 be implemented as a pre-requisite
x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/ClientTransformIndexer.java
"Failure updating stats of transform, unexpected version conflict of internal state, resetting to recover: "
                            + statsExc.getMessage()
                    );
                    if (failureHandler.handleStatePersistenceFailure(statsExc, getConfig().getSettings()) == false) {
                        
                        transformsConfigManager.getTransformStoredDoc(
                            transformConfig.getId(),
                            false,
                            ActionListener.wrap(storedDocAndSeqNoPrimaryTerm -> {
                                updateSeqNoPrimaryTermAndIndex(seqNoPrimaryTermAndIndex, storedDocAndSeqNoPrimaryTerm.v2());
                                listener.onFailure(statsExc);
                            }, e2 -> listener.onFailure(statsExc))
                        );
                        
                        return;
                    }
                } else {
                    logger.warn(() -> "[" + transformConfig.getId() + "] updating stats of transform failed.", statsExc);
                    auditor.warning(getJobId(), "Failure updating stats of transform: " + statsExc.getMessage());
                    failureHandler.handleStatePersistenceFailure(statsExc, getConfig().getSettings());
                }
                listener.onFailure(statsExc);
            })
        );
    }
    void updateSeqNoPrimaryTermAndIndex(SeqNoPrimaryTermAndIndex expectedValue, SeqNoPrimaryTermAndIndex newValue) {
        logger.debug(() -> format("[%s] Updated state document from [%s] to [%s]", transformConfig.getId(), expectedValue, newValue));
        boolean updated = seqNoPrimaryTermAndIndexHolder.compareAndSet(expectedValue, newValue);