# Join, or equivalent to retrieve accurate objects

**URL:** <https://discuss.elastic.co/t/join-or-equivalent-to-retrieve-accurate-objects/9076>\
**Category:** Elasticsearch\
**Created:** [September 20, 2012, 12:39pm UTC](https://discuss.elastic.co/t/join-or-equivalent-to-retrieve-accurate-objects/9076 "2012-09-20T12:39:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joakim\_Ekstrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joakim_ekstrom/32/2692_2.png) [@Joakim\_Ekstrom](https://discuss.elastic.co/u/Joakim_Ekstrom)\
**Post date:** [September 20, 2012, 12:39pm UTC](https://discuss.elastic.co/t/join-or-equivalent-to-retrieve-accurate-objects/9076/1 "2012-09-20T12:39:15Z")

</div>

Hi,

I've got a table of jobs, and a table of users. They relate to each other  
in a table called job\_affinities, where a job\_id, a user\_id and an affinity  
score.

I would like to get a list of jobs, and for the currently logged in user,  
sort this list by his/her affinity for each job. How can this be done,  
without nesting the entire list of users, with their affinities, for each  
job?

Thanks,  
Jocke

--

---

<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, 3:12am UTC](https://discuss.elastic.co/t/join-or-equivalent-to-retrieve-accurate-objects/9076/2 "2017-07-06T03:12:08Z")

</div>

Closed on July 6, 2017, 3:12am UTC


