# Compare 2 indexes with many fields and same structure and set alert watcher on threshold

**URL:** <https://discuss.elastic.co/t/compare-2-indexes-with-many-fields-and-same-structure-and-set-alert-watcher-on-threshold/215965>\
**Category:** Elasticsearch\
**Created:** [January 21, 2020, 11:45pm UTC](https://discuss.elastic.co/t/compare-2-indexes-with-many-fields-and-same-structure-and-set-alert-watcher-on-threshold/215965 "2020-01-21T23:45:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adifucan](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@adifucan](https://discuss.elastic.co/u/adifucan)\
**Post date:** [January 21, 2020, 11:45pm UTC](https://discuss.elastic.co/t/compare-2-indexes-with-many-fields-and-same-structure-and-set-alert-watcher-on-threshold/215965/1 "2020-01-21T23:45:32Z")

</div>

Hi guys! I'm looking for an advice.

I have 2 indexes with many identical fields. I just want to compare values of these fields and send an email notification if these values are beyond some threshold.  
So is it possible to compare all values in a bulk operation and not to compare 2 indexes by each field as there are huge amount of fields so there will be a huge amount of watchers.

Here is an example of my indexer:

```
{ 
   "index_1":{ 
      "mappings":{ 
         "ttfb":{ 
            "properties":{ 
               "Checkout Billing/Shipping Information":{ 
                  "type":"long"
               },
               "Checkout Estimate Shipping Methods":{ 
                  "type":"long"
               },
               "Checkout Payment Info/Place Order":{ 
                  "type":"long"
               },
               "Checkout success":{ 
                  "type":"long"
               },
               "Clear Shopping Cart":{ 
                  "type":"long"
               },
               "Configurable Product 1 Add To Cart":{ 
                  "type":"long"
               },
               "Configurable Product 1 View":{ 
                  "type":"long"
               },
               "Configurable Product 2 Add To Cart":{ 
                  "type":"long"
               },
               "Configurable Product 2 View":{ 
                  "type":"long"
               },
               "Configurable Product 3 Add To Cart":{ 
                  "type":"long"
               },
               "Configurable Product 3 View":{ 
                  "type":"long"
               },
               "Get Configurable Product Options":{ 
                  "type":"long"
               },
               "Load Cart Section 1":{ 
                  "type":"long"
               },
               "Load Cart Section 10":{ 
                  "type":"long"
               },
               "Load Cart Section 2":{ 
                  "type":"long"
               },
               "Load Cart Section 3":{ 
                  "type":"long"
               },
               "Load Cart Section 4":{ 
                  "type":"long"
               },
               "Load Cart Section 5":{ 
                  "type":"long"
               },
               "Load Cart Section 6":{ 
                  "type":"long"
               },
               "Load Cart Section 7":{ 
                  "type":"long"
               },
               "Load Cart Section 8":{ 
                  "type":"long"
               },
               "Load Cart Section 9":{ 
                  "type":"long"
               },
               "Load Customer Private Data":{ 
                  "type":"long"
               },
               "Login":{ 
                  "type":"long"
               },
               "Logout":{ 
                  "type":"long"
               },
               "Open Cart":{ 
                  "type":"long"
               },
               "Open Category":{ 
                  "type":"long"
               },
               "Open Login Page":{ 
                  "type":"long"
               },
               "Open Quote":{ 
                  "type":"long"
               },
               "Open Quotes":{ 
                  "type":"long"
               },
               "Open Quotes Grid":{ 
                  "type":"long"
               },
               "Process categories ids":{ 
                  "type":"long"
               },
               "Quote Checkout Start":{ 
                  "type":"long"
               },
               "Quote Recalculate":{ 
                  "type":"long"
               },
               "Request Quote":{ 
                  "type":"long"
               },
               "Send Quote":{ 
                  "type":"long"
               },
               "Simple Product 1 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 1 View":{ 
                  "type":"long"
               },
               "Simple Product 10 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 10 View":{ 
                  "type":"long"
               },
               "Simple Product 2 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 2 View":{ 
                  "type":"long"
               },
               "Simple Product 3 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 3 View":{ 
                  "type":"long"
               },
               "Simple Product 4 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 4 View":{ 
                  "type":"long"
               },
               "Simple Product 5 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 5 View":{ 
                  "type":"long"
               },
               "Simple Product 6 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 6 View":{ 
                  "type":"long"
               },
               "Simple Product 7 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 7 View":{ 
                  "type":"long"
               },
               "Simple Product 8 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 8 View":{ 
                  "type":"long"
               },
               "Simple Product 9 Add To Cart":{ 
                  "type":"long"
               },
               "Simple Product 9 View":{ 
                  "type":"long"
               },
               "Update Quote On Open":{ 
                  "type":"long"
               }
            }
         }
      }
   }
}

```

I'm using Elasticsearch 5.5.1

---

<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 18, 2020, 11:45pm UTC](https://discuss.elastic.co/t/compare-2-indexes-with-many-fields-and-same-structure-and-set-alert-watcher-on-threshold/215965/2 "2020-02-18T23:45:33Z")

</div>

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