# How to setup cluster with 2 Nodes with same index with different data

**URL:** https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752
**Category:** Elasticsearch
**Created:** [May 15, 2020, 4:47am UTC](https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752 "2020-05-15T04:47:29Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Abhijit\_Desai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhijit_desai/32/68396_2.png) [@Abhijit\_Desai](https://discuss.elastic.co/u/Abhijit_Desai)
#### Post date: [May 15, 2020, 4:47am UTC](https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752/1 "2020-05-15T04:47:29Z")

</div>

I have 2 nodes - same index but have different data date wise as. What is the configuration of the nodes so that I can get both data from cluster url

Where Node 1 - contains 2018 year data  
node 2 - contains 2019 year data

I tried -

## Node 1 - yml

cluster.name: elasticsearch-1  
node.name: elasticsearch-1  
node.master: true  
node.data: true  
discovery.zen.ping.unicast.hosts: ["node1","node2"]

## Node 2 - yml

cluster.name: elasticsearch-1  
node.name: elasticsearch-2  
node.master: false  
node.data: true  
discovery.zen.ping.unicast.hosts: ["node1","node2"]

But I can see only Node 1 data

I need to see combined node 1 & 2 data

Please help

Thanks

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 15, 2020, 5:20am UTC](https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752/2 "2020-05-15T05:20:21Z")

</div>

Welcome! 😃  
What version are you running?

---

<div class="post-metadata">

### Author: ![Abhijit\_Desai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhijit_desai/32/68396_2.png) [@Abhijit\_Desai](https://discuss.elastic.co/u/Abhijit_Desai)
#### Post date: [May 15, 2020, 5:39am UTC](https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752/3 "2020-05-15T05:39:30Z")

</div>

Version - 6.8.8

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 15, 2020, 5:43am UTC](https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752/4 "2020-05-15T05:43:15Z")

</div>

What do your Elasticsearch logs show then, they should be trying to connect to each other.

Please aso format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

---

<div class="post-metadata">

### Author: ![Abhijit\_Desai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhijit_desai/32/68396_2.png) [@Abhijit\_Desai](https://discuss.elastic.co/u/Abhijit_Desai)
#### Post date: [May 15, 2020, 5:50am UTC](https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752/5 "2020-05-15T05:50:37Z")

</div>

I can see Master's (node 1) data on both the nodes but cant see node 2 data

Node 2 server giving below log specially for the index I am looking for

`[2020-05-15T05:06:51,915][WARN][o.e.g.DanglingIndicesState] [elasticsearch-2] [[tachyonlivelogs/AoEZlDvhSW2AZvUuZKGSVg]] can not be imported as a dangling index, as index with same name already exists in cluster metadata`

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 15, 2020, 5:51am UTC](https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752/6 "2020-05-15T05:51:40Z")

</div>

Ah ok, so you have the **exact same** index name, that won't work. You should really use a naming structure like `tachyonlivelogs-2019` to keep things logically separated.

---

<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: [June 12, 2020, 5:51am UTC](https://discuss.elastic.co/t/how-to-setup-cluster-with-2-nodes-with-same-index-with-different-data/232752/7 "2020-06-12T05:51:48Z")

</div>

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