# How to do elasticsearch data comparison

**URL:** https://discuss.elastic.co/t/how-to-do-elasticsearch-data-comparison/107061
**Category:** Elasticsearch
**Created:** [November 9, 2017, 3:49pm UTC](https://discuss.elastic.co/t/how-to-do-elasticsearch-data-comparison/107061 "2017-11-09T15:49:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![varun1992](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@varun1992](https://discuss.elastic.co/u/varun1992)
#### Post date: [November 9, 2017, 3:49pm UTC](https://discuss.elastic.co/t/how-to-do-elasticsearch-data-comparison/107061/1 "2017-11-09T15:49:03Z")

</div>

Sir,

I have index named security, where i indexed a website log.  
I need to create a query for calculating how many people connected to site this month and last month, then compare the count .

Is there a way to do compare 2 months data in query ??

---

<div class="post-metadata">

### Author: ![mujtabahussain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mujtabahussain/32/17514_2.png) [@mujtabahussain](https://discuss.elastic.co/u/mujtabahussain)
#### Post date: [November 9, 2017, 11:45pm UTC](https://discuss.elastic.co/t/how-to-do-elasticsearch-data-comparison/107061/2 "2017-11-09T23:45:48Z")

</div>

Hey!

I am sure there is! But first a few questions.

1. Whats the index look like?
2. What have you tried so far?
3. Which docs have you looked at?

🙂

---

<div class="post-metadata">

### Author: ![varun1992](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@varun1992](https://discuss.elastic.co/u/varun1992)
#### Post date: [November 14, 2017, 3:09pm UTC](https://discuss.elastic.co/t/how-to-do-elasticsearch-data-comparison/107061/3 "2017-11-14T15:09:49Z")

</div>

I have 2 log index. one for the traffic and other for error listing.  
I need to create a new index by combining some fields of both indices.

---

<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: [December 12, 2017, 3:10pm UTC](https://discuss.elastic.co/t/how-to-do-elasticsearch-data-comparison/107061/4 "2017-12-12T15:10:11Z")

</div>

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