# Need help framing index, id and document

**URL:** <https://discuss.elastic.co/t/need-help-framing-index-id-and-document/54117>\
**Category:** Elasticsearch\
**Created:** [June 28, 2016, 6:52am UTC](https://discuss.elastic.co/t/need-help-framing-index-id-and-document/54117 "2016-06-28T06:52:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sampathkumar23](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@sampathkumar23](https://discuss.elastic.co/u/sampathkumar23)\
**Post date:** [June 28, 2016, 6:52am UTC](https://discuss.elastic.co/t/need-help-framing-index-id-and-document/54117/1 "2016-06-28T06:52:24Z")

</div>

we have problem statement. We want to load around 50 million email addresses into elastic search in the initial load(probably chunking into several splits). later on we will be adding in few thousands every day. Email addresses are the only entity in the document. Can you please suggest the number of primary shards and replica shards that we need to host? Also what would be appropriate id and document structure?  
ex -  
contacts/email/hello@gmail.com  
{"email":"hello@gmail.com"}  
or  
contacts/email  
{"email":"hello@gmail.com"}

These email addresses existence will be checked by realtime traffic.  
we are thinking that the first approach of having the email address as id will be help faster retrieval than the second one. Any suggestions?

---

<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:** [June 29, 2016, 7:03am UTC](https://discuss.elastic.co/t/need-help-framing-index-id-and-document/54117/2 "2016-06-29T07:03:56Z")

</div>

> [@sampathkumar23](#):
>
> Can you please suggest the number of primary shards and replica shards that we need to hos

No, you need to figure that out.  
Start wth the default 5 primary and 1 set of replicas. Go from there.

---

<div class="post-metadata">

**Author:** ![sampathkumar23](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@sampathkumar23](https://discuss.elastic.co/u/sampathkumar23)\
**Post date:** [June 29, 2016, 12:19pm UTC](https://discuss.elastic.co/t/need-help-framing-index-id-and-document/54117/3 "2016-06-29T12:19:15Z")

</div>

Thank you Mark. We have decided that we will find out in PT. we will storing and retrieving email addresses only. Do you have any suggestion in the following ? It would be almost 70 - 80 million email addresses

contacts/email/hello@gmail.com  
{"email":"hello@gmail.com"}  
Vs  
contacts/email  
{"email":"hello@gmail.com"}

---

<div class="post-metadata">

**Author:** ![sampathkumar23](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@sampathkumar23](https://discuss.elastic.co/u/sampathkumar23)\
**Post date:** [June 29, 2016, 12:40pm UTC](https://discuss.elastic.co/t/need-help-framing-index-id-and-document/54117/4 "2016-06-29T12:40:07Z")

</div>

Also just wanted to check if is there any drawback in having email addresses as id?

---

<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 5, 2017, 10:39pm UTC](https://discuss.elastic.co/t/need-help-framing-index-id-and-document/54117/5 "2017-07-05T22:39:34Z")

</div>


