# ELK index field comparison

**URL:** <https://discuss.elastic.co/t/elk-index-field-comparison/140687>\
**Category:** Elasticsearch\
**Created:** [July 19, 2018, 8:14am UTC](https://discuss.elastic.co/t/elk-index-field-comparison/140687 "2018-07-19T08:14:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [July 19, 2018, 8:14am UTC](https://discuss.elastic.co/t/elk-index-field-comparison/140687/1 "2018-07-19T08:14:15Z")

</div>

Hello all,

I have two indexes one index contains the list of malicious domains(index:malicious index) and other index has the logs from my DNS server(indexname:DNSindex) i need to compare whether the field(domainname) which is in DNSindex has the malicious domain.

How to do it?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Johnnycc1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnnycc1/32/26069_2.png) [@Johnnycc1](https://discuss.elastic.co/u/Johnnycc1)\
**Post date:** [July 19, 2018, 10:51am UTC](https://discuss.elastic.co/t/elk-index-field-comparison/140687/2 "2018-07-19T10:51:08Z")

</div>

I'd love to know what other people say but from my experience this is not possible with elastic search by itself. A little python to loop through one index and search the other, or a logstash job that uses one index from elastic as input, then runs a query in the filter -- would be the two things I would recommend.

---

<div class="post-metadata">

**Author:** ![vinu89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinu89/32/45939_2.png) [@vinu89](https://discuss.elastic.co/u/vinu89)\
**Post date:** [July 20, 2018, 4:17am UTC](https://discuss.elastic.co/t/elk-index-field-comparison/140687/3 "2018-07-20T04:17:00Z")

</div>

Thanks if it can be done through in kibana using join or nested queries then it would be a convenient method

---

<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 17, 2018, 4:17am UTC](https://discuss.elastic.co/t/elk-index-field-comparison/140687/4 "2018-08-17T04:17:01Z")

</div>

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