# Match two fields based on same value

**URL:** <https://discuss.elastic.co/t/match-two-fields-based-on-same-value/14910>\
**Category:** Elasticsearch\
**Created:** [December 17, 2013, 11:53am UTC](https://discuss.elastic.co/t/match-two-fields-based-on-same-value/14910 "2013-12-17T11:53:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhiage](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abhiage](https://discuss.elastic.co/u/abhiage)\
**Post date:** [December 17, 2013, 11:53am UTC](https://discuss.elastic.co/t/match-two-fields-based-on-same-value/14910/1 "2013-12-17T11:53:37Z")

</div>

Does elasticsearch support below kind of query?

Select \* from table\_name1 where table\_name1.id = table\_name2.id.

In elasticsearch scenario, Can we match two separate fields which are  
having same values?

--  
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/98e08610-3533-4bfd-9bcd-ecb5d304083b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98e08610-3533-4bfd-9bcd-ecb5d304083b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:00am UTC](https://discuss.elastic.co/t/match-two-fields-based-on-same-value/14910/2 "2017-07-06T02:00:38Z")

</div>


