# How to do using Elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-do-using-elasticsearch/142561>\
**Category:** Elasticsearch\
**Created:** [August 1, 2018, 12:04pm UTC](https://discuss.elastic.co/t/how-to-do-using-elasticsearch/142561 "2018-08-01T12:04:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Md\_Ghulam\_khaja](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Md\_Ghulam\_khaja](https://discuss.elastic.co/u/Md_Ghulam_khaja)\
**Post date:** [August 1, 2018, 12:04pm UTC](https://discuss.elastic.co/t/how-to-do-using-elasticsearch/142561/1 "2018-08-01T12:04:10Z")

</div>

How to compare fields of two indexed document under one index with any parent child relationship between the documents?

I wan to compare fields (userid, username) of doc1 from fields(dummyuserid, dummyusername) from doc2.

Doc1 and doc2 are indexed under my\_index.

---

<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:** [August 29, 2018, 12:04pm UTC](https://discuss.elastic.co/t/how-to-do-using-elasticsearch/142561/2 "2018-08-29T12:04:17Z")

</div>

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