# How to compare index pattern values?

**URL:** <https://discuss.elastic.co/t/how-to-compare-index-pattern-values/296394>\
**Category:** Elasticsearch\
**Created:** [February 6, 2022, 12:51pm UTC](https://discuss.elastic.co/t/how-to-compare-index-pattern-values/296394 "2022-02-06T12:51:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Travel\_Time](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/travel_time/32/78389_2.png) [@Travel\_Time](https://discuss.elastic.co/u/Travel_Time)\
**Post date:** [February 6, 2022, 12:51pm UTC](https://discuss.elastic.co/t/how-to-compare-index-pattern-values/296394/1 "2022-02-06T12:51:53Z")

</div>

Hello. I want to compare index patterns and as a result find the same ones.

So for example I have index pattern1 where I have indexes with columns like --\>

|pattern1\* [index-1, index-2]  
| col1 | col2 | col3 |  
======|=====|======  
| row1 | row1 | row1 |  
| row2 | row2 | row2 |  
| row5 | row5 | row5 |  
| row6 | row6 | row6 |  
======|=====|======

| pattern2\* [index-3, index-4]  
|col2 | col3 | col4 |  
======|=====|======  
|row2 | row2 | row2 |  
| row5 | row5 | row5 |  
| row7 | row7 | row7 |  
======|=====|======

So I want to compare col2 and col3 in pattern1\* with col2 and col3 in pattern2\*. So as the result I will have col2 and col3 with its row values like pattern1\* col2 and col3 values are in pattern2\* col2 and col3. As a result I have ==\>

* * *

| col2 | col3 |  
======|======  
| row2 | row2 |  
| row7 | row7 |  
======|======

Is it possible with Kibana or with Elasticsearch-py ?  
or how to get all documents from index patterns to compare them later with python ?  
Thank you.

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [February 7, 2022, 1:56am UTC](https://discuss.elastic.co/t/how-to-compare-index-pattern-values/296394/2 "2022-02-07T01:56:55Z")

</div>

I suppose this post is quite similar to your previous unsolved post. That's better to continue the previous post to avoid any confusion caused by splitting related discussions.

---

<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:** [March 7, 2022, 1:56am UTC](https://discuss.elastic.co/t/how-to-compare-index-pattern-values/296394/3 "2022-03-07T01:56:59Z")

</div>

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