# How to create replicas after data loaded

**URL:** <https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476>\
**Category:** Elasticsearch\
**Created:** [November 19, 2013, 10:04pm UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476 "2013-11-19T22:04:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerry\_Russell](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jerry\_Russell](https://discuss.elastic.co/u/Jerry_Russell)\
**Post date:** [November 19, 2013, 10:04pm UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476/1 "2013-11-19T22:04:46Z")

</div>

I have been trying to find a solution to this here on this group and many  
Google searches.

I set up ES with 5 shards per index, 0 replicas. I create a new index by  
day and hour and have loaded content. After loading 750M records, I end up  
with 1425 shards across 285 indices. Everything is working fine.

Now I want to add a replica, so I use the curl command:

curl -XPUT 'localhost:9200/\*/\_settings' -d '{ "index": {  
"number\_of\_replicas" : 1}}'

Which also worked fine - I can query ES and see that each index is marked  
as having 1 replica. The shards however that would be the replica shards  
are marked as Unassigned.

How do I go about forcing ES to actually replicate the indexes now into  
these replica shards?

Thanks,  
Jerry

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 19, 2013, 10:08pm UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476/2 "2013-11-19T22:08:45Z")

</div>

On Tue, Nov 19, 2013 at 5:04 PM, Jerry Russell [jerryrussell@gmail.com](mailto:jerryrussell@gmail.com)wrote:

Which also worked fine - I can query ES and see that each index is marked

> as having 1 replica. The shards however that would be the replica shards  
> are marked as Unassigned.
> 
> How do I go about forcing ES to actually replicate the indexes now into  
> these replica shards?

My "is it plugged in" question: do you have more than one node in your  
cluster? Like, check localhost:9200/\_cluster/health and make sure.

Beyond that, does the health api tell you that some are being assigned?  
Are there any logs about failure to assign?

Nik

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 19, 2013, 10:09pm UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476/3 "2013-11-19T22:09:21Z")

</div>

How many nodes do you have?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 19 novembre 2013 at 23:04:49, Jerry Russell ([jerryrussell@gmail.com](mailto:jerryrussell@gmail.com)) a écrit:

I have been trying to find a solution to this here on this group and many Google searches.

I set up ES with 5 shards per index, 0 replicas. I create a new index by day and hour and have loaded content. After loading 750M records, I end up with 1425 shards across 285 indices. Everything is working fine.

Now I want to add a replica, so I use the curl command:

curl -XPUT 'localhost:9200/\*/\_settings' -d '{ "index": { "number\_of\_replicas" : 1}}'

Which also worked fine - I can query ES and see that each index is marked as having 1 replica. The shards however that would be the replica shards are marked as Unassigned.

How do I go about forcing ES to actually replicate the indexes now into these replica shards?

## Thanks, Jerry

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jerry\_Russell](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jerry\_Russell](https://discuss.elastic.co/u/Jerry_Russell)\
**Post date:** [November 19, 2013, 10:13pm UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476/4 "2013-11-19T22:13:24Z")

</div>

One node. Will replicas not be created if there is only one node?

Thanks,  
Jerry

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 19, 2013, 10:16pm UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476/5 "2013-11-19T22:16:17Z")

</div>

No. It does not really make sense to replicate data on the same node.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 19 novembre 2013 at 23:13:27, Jerry Russell ([jerryrussell@gmail.com](mailto:jerryrussell@gmail.com)) a écrit:

One node. Will replicas not be created if there is only one node?

## Thanks, Jerry

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Andreas\_Echavez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreas_echavez/32/1959_2.png) [@Andreas\_Echavez](https://discuss.elastic.co/u/Andreas_Echavez)\
**Post date:** [November 19, 2013, 10:16pm UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476/6 "2013-11-19T22:16:24Z")

</div>

ES will intentionally avoid replicating shards on the same node so the  
cluster is always redundant. You'd need to add another node for it to  
automatically replicate.

-Andreas

On Tuesday, November 19, 2013 2:13:24 PM UTC-8, Jerry Russell wrote:

> One node. Will replicas not be created if there is only one node?
> 
> Thanks,  
> Jerry

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jerry\_Russell](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jerry\_Russell](https://discuss.elastic.co/u/Jerry_Russell)\
**Post date:** [November 19, 2013, 11:00pm UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476/7 "2013-11-19T23:00:31Z")

</div>

I understand it doesn't make sense to replicate with one node. But I am  
seeing a weird problem with searching that I was hoping was related to not  
having a replica (always getting different number of search results for  
same search with static data). This problem I am running into did not occur  
on same data set when using two nodes with replicas, so I needed to confirm  
in the current environment if replicas were the real cause or not.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:06am UTC](https://discuss.elastic.co/t/how-to-create-replicas-after-data-loaded/14476/8 "2017-07-06T02:06:09Z")

</div>


