# Trouble comparing fields of 2 separate index

**URL:** <https://discuss.elastic.co/t/trouble-comparing-fields-of-2-separate-index/217215>\
**Category:** Elasticsearch\
**Created:** [January 30, 2020, 2:47pm UTC](https://discuss.elastic.co/t/trouble-comparing-fields-of-2-separate-index/217215 "2020-01-30T14:47:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Preeti](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@Preeti](https://discuss.elastic.co/u/Preeti)\
**Post date:** [January 30, 2020, 2:47pm UTC](https://discuss.elastic.co/t/trouble-comparing-fields-of-2-separate-index/217215/1 "2020-01-30T14:47:41Z")

</div>

Hi All,

Need advise in creating a watch which will compare 2 text fields present in 2 different indexes. Condition is if any word present in field of 2nd index is found in field of 1st index, it should alert.  
Eg -  
Index 1 have field -  
"response" : "Hi this is just test"  
Index 2 have field -  
"response": "test to check if matches"

It should alert because "test" is present in both field of different 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:** [February 27, 2020, 2:47pm UTC](https://discuss.elastic.co/t/trouble-comparing-fields-of-2-separate-index/217215/2 "2020-02-27T14:47:43Z")

</div>

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