# Separate tenant data within a single index in a multi tenant application

**URL:** <https://discuss.elastic.co/t/separate-tenant-data-within-a-single-index-in-a-multi-tenant-application/76647>\
**Category:** Elasticsearch\
**Created:** [February 27, 2017, 3:24pm UTC](https://discuss.elastic.co/t/separate-tenant-data-within-a-single-index-in-a-multi-tenant-application/76647 "2017-02-27T15:24:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ESCoder](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@ESCoder](https://discuss.elastic.co/u/ESCoder)\
**Post date:** [February 27, 2017, 3:24pm UTC](https://discuss.elastic.co/t/separate-tenant-data-within-a-single-index-in-a-multi-tenant-application/76647/1 "2017-02-27T15:24:43Z")

</div>

Hi,

I have a multi tenant application and all customers data needs to be indexed. I went through the following articles to come up with a good strategy for this.

> **[Discovering the Need for an Indexing Strategy in Multi-Tenant Applications
	  	...](https://www.elastic.co/blog/found-multi-tenancy)**
>
> There are many buzzwords that may be applied to Elasticsearch. Multi-tenancy is one. Getting started with a multi-tenant use case can be deceptively easy - there are some pitfalls that will require a little careful design.

For us there is a strict requirement customer data needs to be properly segregated and the approach of one index for all tenant data may not be the right approach for us as we are relying on filtering capabilities to segregate the data.

Are there any other strategies that would help us in our case.

Thank you

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 27, 2017, 4:23pm UTC](https://discuss.elastic.co/t/separate-tenant-data-within-a-single-index-in-a-multi-tenant-application/76647/2 "2017-02-27T16:23:13Z")

</div>

Hey,

you can have multiple indices with all the drawbacks mentioned. I dont understand what prevents you from using an filtered alias compared to single indices? The data is still lying next to each other on disk, so why exactly is this a problem? Maybe the definition of 'properly segregated' is a different one...

You have to bite one bullet in this case. But if you need true separation you will need separate clusters anyway, so I personally would not be worried with one big index.

--Alex

---

<div class="post-metadata">

**Author:** ![ESCoder](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@ESCoder](https://discuss.elastic.co/u/ESCoder)\
**Post date:** [February 27, 2017, 4:57pm UTC](https://discuss.elastic.co/t/separate-tenant-data-within-a-single-index-in-a-multi-tenant-application/76647/3 "2017-02-27T16:57:16Z")

</div>

@spinscale thank you very much for your reply. I appreciate it. that answers my question..."You have to bite one bullet in this case" 🙂

---

<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:** [March 27, 2017, 4:57pm UTC](https://discuss.elastic.co/t/separate-tenant-data-within-a-single-index-in-a-multi-tenant-application/76647/4 "2017-03-27T16:57:28Z")

</div>

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