# Join on metadata

**URL:** <https://discuss.elastic.co/t/join-on-metadata/143600>\
**Category:** Elasticsearch\
**Created:** [August 8, 2018, 9:23pm UTC](https://discuss.elastic.co/t/join-on-metadata/143600 "2018-08-08T21:23:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pDonS](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@pDonS](https://discuss.elastic.co/u/pDonS)\
**Post date:** [August 8, 2018, 9:23pm UTC](https://discuss.elastic.co/t/join-on-metadata/143600/1 "2018-08-08T21:23:07Z")

</div>

Hi All,

Could please confirm if below is possible? If yes please suggest best way to achieve it

Need the ability to create new metadata on top of Elastic documents without having to re-index. The latter is a veeeery slow operation given the amount of data  
The metadata needs to be available for joins. Assume I have ingested documents of type Doc with a field name  
i. I can create a metadata called mickey, which has a score. I can then do select all Doc d, where d. name=’Joe’ and metadata m.name=’mickey’ and m.parent=d.id and m.score\>9

```
                                                         ii. I can create a metadata called mini which has a color. I can then do select all Doc d, where d. name=’Joe’ and metadata m.name=’mini’ m.parent=d.id and m.color=’red’

                                                       iii. And I can combine select all Doc d, where d. name=’Joe’ and metadata m, m.name=’mini’ m.parent=d.id and m.color=’red’ and m.score=3
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 5, 2018, 9:23pm UTC](https://discuss.elastic.co/t/join-on-metadata/143600/2 "2018-09-05T21:23:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
