# Enhancements to Terms Lookup Mechanism

**URL:** <https://discuss.elastic.co/t/enhancements-to-terms-lookup-mechanism/61065>\
**Category:** Elasticsearch\
**Created:** [September 21, 2016, 1:00am UTC](https://discuss.elastic.co/t/enhancements-to-terms-lookup-mechanism/61065 "2016-09-21T01:00:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jinal\_Shah\_2](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Jinal\_Shah\_2](https://discuss.elastic.co/u/Jinal_Shah_2)\
**Post date:** [September 21, 2016, 1:00am UTC](https://discuss.elastic.co/t/enhancements-to-terms-lookup-mechanism/61065/1 "2016-09-21T01:00:46Z")

</div>

Hi,

With current [Terms Lookup Mechanism](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html#query-dsl-terms-lookup), we can get referenced documents based on ID. The current example is using user and tweets types where query runs on user.follower field which references ID of the user in tweet type.

Any plans of enhancing this feature to support queries. For example, query on user name, and use resulting document IDs to fetch tweets.

Similar functionality is available with following plugin but it not supported in 2.x yet.

> **[Relational Joins for Elasticsearch: the SIREn Join Plugin](https://siren.io/relational-joins-for-elasticsearch-the-siren-join-plugin/)**
>
> We are very very happy to announce today the general availability of SIREn Join, an open source plugin for Elasticsearch...

Thanks,  
Jinal

---

<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 5, 2017, 10:18pm UTC](https://discuss.elastic.co/t/enhancements-to-terms-lookup-mechanism/61065/2 "2017-07-05T22:18:40Z")

</div>


