# How to set different storage to different types in same index?

**URL:** <https://discuss.elastic.co/t/how-to-set-different-storage-to-different-types-in-same-index/3697>\
**Category:** Elasticsearch\
**Created:** [December 23, 2010, 11:57am UTC](https://discuss.elastic.co/t/how-to-set-different-storage-to-different-types-in-same-index/3697 "2010-12-23T11:57:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheepu](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@cheepu](https://discuss.elastic.co/u/cheepu)\
**Post date:** [December 23, 2010, 11:57am UTC](https://discuss.elastic.co/t/how-to-set-different-storage-to-different-types-in-same-index/3697/1 "2010-12-23T11:57:39Z")

</div>

Hi  
I am creating an index named amazon and It has two type cd and book.  
I have to do setting for type cd in memory and type book in the file.  
I read that we can do the setting while creating the index and I did  
that but since both the type belong to the same index, so how can we  
set different storage to different type.

Thanks

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 23, 2010, 4:42pm UTC](https://discuss.elastic.co/t/how-to-set-different-storage-to-different-types-in-same-index/3697/2 "2010-12-23T16:42:26Z")

</div>

You will need to have two different indices, one called book and one called  
cd (you can still search across them). Then, when you create the index (from  
the API), set the index.store.type setting to control where it will be  
stored. Note, long term persistency is only supported for for memory indices  
when using shared gateway (shared fs, s3).

If you plan to store the index in memory for performance reasons, my  
suggestion is first make sure that you really have a performance problem.

On Thu, Dec 23, 2010 at 1:19 PM, cheepu [cheeputech@gmail.com](mailto:cheeputech@gmail.com) wrote:

> Hi  
> I am creating an index named amazon and It has two type cd and book.  
> I have to do setting for type cd in memory and type book in the file.  
> I read that we can do the setting while creating the index and I did that  
> but since both the type belong to the same index, so how can we set  
> different storage to different type.
> 
> ## Thanks
> 
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/How-to-set-different-storage-to-different-types-in-same-index-tp2135982p2135982.html](http://elasticsearch-users.115913.n3.nabble.com/How-to-set-different-storage-to-different-types-in-same-index-tp2135982p2135982.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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, 4:14am UTC](https://discuss.elastic.co/t/how-to-set-different-storage-to-different-types-in-same-index/3697/3 "2017-07-06T04:14:52Z")

</div>

Closed on July 6, 2017, 4:14am UTC


