# Elasticsearch design consideration

**URL:** <https://discuss.elastic.co/t/elasticsearch-design-consideration/43054>\
**Category:** Elasticsearch\
**Created:** [February 29, 2016, 10:07pm UTC](https://discuss.elastic.co/t/elasticsearch-design-consideration/43054 "2016-02-29T22:07:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuiFB](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GuiFB](https://discuss.elastic.co/u/GuiFB)\
**Post date:** [February 29, 2016, 10:07pm UTC](https://discuss.elastic.co/t/elasticsearch-design-consideration/43054/1 "2016-02-29T22:07:30Z")

</div>

Hi all  
Hope I post in the right section.  
We have a small design problem, and I would like to have some advice.

- We have a main index containing thousands of items.
- We have thousands of users.
- Each users can have a part or all the items of the main index.
- Each users can add some informations (searchable) to this items.  
For the moment, we have created an index per user. but it multiply the number of shards, and result some memory failure.

All advice are good !  
Thanks in advance for your help

---

<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:** [February 29, 2016, 10:12pm UTC](https://discuss.elastic.co/t/elasticsearch-design-consideration/43054/2 "2016-02-29T22:12:04Z")

</div>

So you have per user items, but then that user can also access other items belonging to other users?

---

<div class="post-metadata">

**Author:** ![GuiFB](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GuiFB](https://discuss.elastic.co/u/GuiFB)\
**Post date:** [February 29, 2016, 10:13pm UTC](https://discuss.elastic.co/t/elasticsearch-design-consideration/43054/3 "2016-02-29T22:13:51Z")

</div>

Thanks for your answer.  
nope.  
Other user can't search the user index. Users share no datas between them

---

<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:** [February 29, 2016, 10:14pm UTC](https://discuss.elastic.co/t/elasticsearch-design-consideration/43054/4 "2016-02-29T22:14:55Z")

</div>

Oh right, then use routing with a single index.  
You may need to move large users out into their own index though.

---

<div class="post-metadata">

**Author:** ![GuiFB](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GuiFB](https://discuss.elastic.co/u/GuiFB)\
**Post date:** [February 29, 2016, 10:29pm UTC](https://discuss.elastic.co/t/elasticsearch-design-consideration/43054/5 "2016-02-29T22:29:36Z")

</div>

Basicaly  
We just user just add one information, the price they sell the item.  
So even large users have lot in common with small one.  
But I don't understand how routing will help us,because we have to store the price

---

<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:** [February 29, 2016, 10:32pm UTC](https://discuss.elastic.co/t/elasticsearch-design-consideration/43054/6 "2016-02-29T22:32:12Z")

</div>

Routing just forces the data for a given user into the same shard, which makes search faster as you always go to that shard.

---

<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, 11:12pm UTC](https://discuss.elastic.co/t/elasticsearch-design-consideration/43054/7 "2017-07-05T23:12:45Z")

</div>


