# Transform + Enrichment Policy

**URL:** https://discuss.elastic.co/t/transform-enrichment-policy/334878
**Category:** Elasticsearch
**Tags:** transforms
**Created:** [May 31, 2023, 9:13pm UTC](https://discuss.elastic.co/t/transform-enrichment-policy/334878 "2023-05-31T21:13:57Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Hendrik\_Muhs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendrik_muhs/32/25802_2.png) [@Hendrik\_Muhs](https://discuss.elastic.co/u/Hendrik_Muhs)
#### Post date: [June 1, 2023, 11:29am UTC](https://discuss.elastic.co/t/transform-enrichment-policy/334878/3 "2023-06-01T11:29:20Z")

</div>

You can do a "join" directly without _enrich_. Transform `source` can take an array of indices or patterns. All you need is a "primary key", so a field that exists in both indices under the same name(if that's not the case you can help yourself with aliases or runtime fields).

In the aggregation part you can copy over the fields you want from your "enrichment index" using either a `top_metrics` aggregation or `scripted_metric`.

The benefit of the "transform only" approach: An update on either index triggers the update.

Example: [Is is possible to partially update a dest doc with transforms? - #4 by Hendrik\_Muhs](https://discuss.elastic.co/t/is-is-possible-to-partially-update-a-dest-doc-with-transforms/209808/4)

---

_[View the full topic](https://discuss.elastic.co/t/transform-enrichment-policy/334878)._
