# Can indexname be associated with two or more index types?

**URL:** <https://discuss.elastic.co/t/can-indexname-be-associated-with-two-or-more-index-types/6710>\
**Category:** Elasticsearch\
**Created:** [February 15, 2012, 6:51am UTC](https://discuss.elastic.co/t/can-indexname-be-associated-with-two-or-more-index-types/6710 "2012-02-15T06:51:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)\
**Post date:** [February 15, 2012, 6:51am UTC](https://discuss.elastic.co/t/can-indexname-be-associated-with-two-or-more-index-types/6710/1 "2012-02-15T06:51:37Z")

</div>

Hi

Can we use same index name associated with two or more index types?  
For example my index name is "exceptionlist" and it will consist of  
two different index type "customerExcetion" and  
"adminDefaultException",  
Can I use index name + index type as a key to store different data and  
as well in the searching also.  
Is it possible?

Thanks

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [February 15, 2012, 9:09am UTC](https://discuss.elastic.co/t/can-indexname-be-associated-with-two-or-more-index-types/6710/2 "2012-02-15T09:09:53Z")

</div>

You create an index. You store data there. Data can be of multiple  
type that you can define in a mapping or via API.

So, yes your requirements should be possible. you can e.g. select the  
type directly in the URI of the REST api.

Peter.

On Feb 15, 7:51 am, sam [mishra.sam...@gmail.com](mailto:mishra.sam...@gmail.com) wrote:

> Hi
> 
> Can we use same index name associated with two or more index types?  
> For example my index name is "exceptionlist" and it will consist of  
> two different index type "customerExcetion" and  
> "adminDefaultException",  
> Can I use index name + index type as a key to store different data and  
> as well in the searching also.  
> Is it possible?
> 
> Thanks

---

<div class="post-metadata">

**Author:** ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)\
**Post date:** [February 15, 2012, 11:31am UTC](https://discuss.elastic.co/t/can-indexname-be-associated-with-two-or-more-index-types/6710/3 "2012-02-15T11:31:06Z")

</div>

Then it will also be possible that I can delete a particular type  
associated with a index with out affecting the rest of the index type?  
If yes then which java api can help me?

Thanks

On Feb 15, 2:09 pm, Karussell [tableyourt...@googlemail.com](mailto:tableyourt...@googlemail.com) wrote:

> You create an index. You store data there. Data can be of multiple  
> type that you can define in a mapping or via API.
> 
> So, yes your requirements should be possible. you can e.g. select the  
> type directly in the URI of the REST api.
> 
> Peter.
> 
> On Feb 15, 7:51 am, sam [mishra.sam...@gmail.com](mailto:mishra.sam...@gmail.com) wrote:
> 
> > Hi
> 
> > Can we use same index name associated with two or more index types?  
> > For example my index name is "exceptionlist" and it will consist of  
> > two different index type "customerExcetion" and  
> > "adminDefaultException",  
> > Can I use index name + index type as a key to store different data and  
> > as well in the searching also.  
> > Is it possible?
> 
> > Thanks

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 15, 2012, 5:20pm UTC](https://discuss.elastic.co/t/can-indexname-be-associated-with-two-or-more-index-types/6710/4 "2012-02-15T17:20:32Z")

</div>

Most actions can be bounded by both index and type. Delete by Query is  
no exception, and in fact, the example used demonstrates deleting all  
documents belonging to a specific type:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--  
Ivan

On Wed, Feb 15, 2012 at 3:31 AM, sam [mishra.sameek@gmail.com](mailto:mishra.sameek@gmail.com) wrote:

> Then it will also be possible that I can delete a particular type  
> associated with a index with out affecting the rest of the index type?  
> If yes then which java api can help me?
> 
> Thanks
> 
> On Feb 15, 2:09 pm, Karussell [tableyourt...@googlemail.com](mailto:tableyourt...@googlemail.com) wrote:
> 
> > You create an index. You store data there. Data can be of multiple  
> > type that you can define in a mapping or via API.
> > 
> > So, yes your requirements should be possible. you can e.g. select the  
> > type directly in the URI of the REST api.
> > 
> > Peter.
> > 
> > On Feb 15, 7:51 am, sam [mishra.sam...@gmail.com](mailto:mishra.sam...@gmail.com) wrote:
> > 
> > > Hi
> > 
> > > Can we use same index name associated with two or more index types?  
> > > For example my index name is "exceptionlist" and it will consist of  
> > > two different index type "customerExcetion" and  
> > > "adminDefaultException",  
> > > Can I use index name + index type as a key to store different data and  
> > > as well in the searching also.  
> > > Is it possible?
> > 
> > > Thanks

---

<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, 3:39am UTC](https://discuss.elastic.co/t/can-indexname-be-associated-with-two-or-more-index-types/6710/5 "2017-07-06T03:39:13Z")

</div>


