# Relations beetween different types

**URL:** <https://discuss.elastic.co/t/relations-beetween-different-types/19286>\
**Category:** Elasticsearch\
**Created:** [August 14, 2014, 1:34pm UTC](https://discuss.elastic.co/t/relations-beetween-different-types/19286 "2014-08-14T13:34:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali\_koyuncu](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@ali\_koyuncu](https://discuss.elastic.co/u/ali_koyuncu)\
**Post date:** [August 14, 2014, 1:34pm UTC](https://discuss.elastic.co/t/relations-beetween-different-types/19286/1 "2014-08-14T13:34:39Z")

</div>

I have an index named DataIndex. It has two types: posts and users.  
The posts have an user which has small info like just id, name but it has  
more. And I regulary update users some fields like followers count,age etc  
. So I must do below jobs:

- When I run on posts type, I want to join users.
- I want to join user's posts. So I can retrieval that the user has 1000  
data etc.

You can suggest using Nested Objects or Parent/Child object. But I  
regulerly update users therefore I can't use nested objects. Parent-Child has  
a cost in terms of performance and memory used.  
I want to know is there any method doing this jobs with high performance.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1ce3fb77-8ada-4716-83cf-897d202d7611%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1ce3fb77-8ada-4716-83cf-897d202d7611%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ramy](https://avatars.discourse-cdn.com/v4/letter/r/8491ac/32.png) [@Ramy](https://discuss.elastic.co/u/Ramy)\
**Post date:** [August 14, 2014, 3:26pm UTC](https://discuss.elastic.co/t/relations-beetween-different-types/19286/2 "2014-08-14T15:26:20Z")

</div>

You can try to save the user \_id in each post!!! maybe it solves your  
problem

Am Donnerstag, 14. August 2014 15:34:39 UTC+2 schrieb ali koyuncu:

> I have an index named DataIndex. It has two types: posts and users.  
> The posts have an user which has small info like just id, name but it has  
> more. And I regulary update users some fields like followers count,age etc  
> . So I must do below jobs:
> 
> - When I run on posts type, I want to join users.
> - I want to join user's posts. So I can retrieval that the user has 1000  
> data etc.
> 
> You can suggest using Nested Objects or Parent/Child object. But I  
> regulerly update users therefore I can't use nested objects. Parent-Child has  
> a cost in terms of performance and memory used.  
> I want to know is there any method doing this jobs with high performance.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3f6d28b3-af7a-4e14-843a-d9c852197a1d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3f6d28b3-af7a-4e14-843a-d9c852197a1d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![ali\_koyuncu](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@ali\_koyuncu](https://discuss.elastic.co/u/ali_koyuncu)\
**Post date:** [August 14, 2014, 3:47pm UTC](https://discuss.elastic.co/t/relations-beetween-different-types/19286/3 "2014-08-14T15:47:43Z")

</div>

Yes, I already have kept user's fields as data's fields in datas.

On Thursday, August 14, 2014 6:26:20 PM UTC+3, Ramy wrote:

> You can try to save the user \_id in each post!!! maybe it solves your  
> problem
> 
> Am Donnerstag, 14. August 2014 15:34:39 UTC+2 schrieb ali koyuncu:
> 
> > I have an index named DataIndex. It has two types: posts and users.  
> > The posts have an user which has small info like just id, name but it has  
> > more. And I regulary update users some fields like followers count,age etc  
> > . So I must do below jobs:
> > 
> > - When I run on posts type, I want to join users.
> > - I want to join user's posts. So I can retrieval that the user has 1000  
> > data etc.
> > 
> > You can suggest using Nested Objects or Parent/Child object. But I  
> > regulerly update users therefore I can't use nested objects. Parent-Child has  
> > a cost in terms of performance and memory used.  
> > I want to know is there any method doing this jobs with high performance.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ab1bd531-c480-44df-8a12-6f76d94d8958%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ab1bd531-c480-44df-8a12-6f76d94d8958%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:08am UTC](https://discuss.elastic.co/t/relations-beetween-different-types/19286/4 "2017-07-06T01:08:31Z")

</div>


