A preview call can be quite expensive and cause timeout in a cluster. As a short term fix we identified 2 (hopefully) small fixes:

- make the call cancellable, the main issue here seems to be that preview calls search without using a parent task id(see this fix for data feeds: https://github.com/elastic/elasticsearch/pull/88142/files#diff-aba58244cb8f9dfa3ac3b6efeb02259e3d5956576f56c1ff5e243dd2aac27381)
- pass the timeout parameter of the preview call to the search call, currently a timeout can be specified, but is ignored for the inner search call, which is executed with no timeout (see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html#search-search-api-query-params).

Both changes are bugs and shall be relatively simple to implement and considered for backport to the 7.17 branch.

@przemekwitek can you have a look at this?

related: #88010
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformAction.java
}
        public Response(List<Map<String, Object>> docs, TransformDestIndexSettings generatedDestIndexSettings) {
            this.docs = docs;
            this.generatedDestIndexSettings = generatedDestIndexSettings;
        }
        public Response(StreamInput in) throws IOException {
            int size = in.readInt();
            this.docs = new ArrayList<>(size);
            for (int i = 0; i < size; i++) {
                this.docs.add(in.readMap());
            }
            this.generatedDestIndexSettings = new TransformDestIndexSettings(in);
        }
        public List<Map<String, Object>> getDocs() {
            return docs;
        }
        public TransformDestIndexSettings getGeneratedDestIndexSettings() {
            return generatedDestIndexSettings;
        }
        @Override
        public void writeTo(StreamOutput out) throws IOException {
            out.writeInt(docs.size());
            for (Map<String, Object> doc : docs) {
                out.writeMapWithConsistentOrder(doc);
            }
            generatedDestIndexSettings.writeTo(out);
        }
        @Override
        public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
            builder.startObject();