# Multiple index is possible

**URL:** <https://discuss.elastic.co/t/multiple-index-is-possible/181097>\
**Category:** Elasticsearch\
**Created:** [May 15, 2019, 5:13am UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097 "2019-05-15T05:13:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elk3/32/46184_2.png) [@elk3](https://discuss.elastic.co/u/elk3)\
**Post date:** [May 15, 2019, 5:13am UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097/1 "2019-05-15T05:13:39Z")

</div>

i have table like emp,dep so there is any possible to create two doc type in single index i.e Put index/emp/1  
put index/dep/1 like this

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 15, 2019, 5:36am UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097/2 "2019-05-15T05:36:30Z")

</div>

No, not in recent versions as [document types are being deprecated](https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch). Read the blog post I linked to for further details and alternatives.

---

<div class="post-metadata">

**Author:** ![elk3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elk3/32/46184_2.png) [@elk3](https://discuss.elastic.co/u/elk3)\
**Post date:** [May 15, 2019, 5:52am UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097/3 "2019-05-15T05:52:10Z")

</div>

when i am trying to create index like this it will throw error

PUT twittera  
{  
"mappings": {  
"user": {  
"properties": {  
"name": { "type": "text" },  
"user\_name": { "type": "keyword" },  
"email": { "type": "keyword" }  
}  
},  
"tweet": {  
"properties": {  
"content": { "type": "text" },  
"user\_name": { "type": "keyword" },  
"tweeted\_at": { "type": "date" }  
}  
}  
}  
}

error like this  
{  
"error": {  
"root\_cause": [  
{  
"type": "mapper\_parsing\_exception",  
"reason": "Root mapping definition has unsupported parameters: [tweet : {properties={tweeted\_at={type=date}, user\_name={type=keyword}, content={type=text}}}] [user : {properties={user\_name={type=keyword}, name={type=text}, email={type=keyword}}}]"  
}  
],  
"type": "mapper\_parsing\_exception",  
"reason": "Failed to parse mapping [\_doc]: Root mapping definition has unsupported parameters: [tweet : {properties={tweeted\_at={type=date}, user\_name={type=keyword}, content={type=text}}}] [user : {properties={user\_name={type=keyword}, name={type=text}, email={type=keyword}}}]",  
"caused\_by": {  
"type": "mapper\_parsing\_exception",  
"reason": "Root mapping definition has unsupported parameters: [tweet : {properties={tweeted\_at={type=date}, user\_name={type=keyword}, content={type=text}}}] [user : {properties={user\_name={type=keyword}, name={type=text}, email={type=keyword}}}]"  
}  
},

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 15, 2019, 5:54am UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097/4 "2019-05-15T05:54:39Z")

</div>

Yes, that is expected as multiple types in an index is no longer supported. Please read the blog post I linked to.

---

<div class="post-metadata">

**Author:** ![elk3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elk3/32/46184_2.png) [@elk3](https://discuss.elastic.co/u/elk3)\
**Post date:** [May 15, 2019, 6:03am UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097/5 "2019-05-15T06:03:10Z")

</div>

than how can i achieve my requirement i want to map emp table dep in a single index  
i.e 1.select \* from emp,  
2 select \* from dep  
or i can create different index ,but how can i relate both both table ,index join is possible  
both data should be displayed in single index via logstash,there is any possible way to achieve this one

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 15, 2019, 10:21am UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097/6 "2019-05-15T10:21:54Z")

</div>

I'd totally forget about the existing model and would just think about the usage to build the right "search" objects for my use case.

Basically I'd recommend to ask yourself 2 questions:

- What kind of objects my users want to get back as a response? If it's object `X`, then just index object `X`
- What typical attributes my users want to search for? Let say I need attribute `a`, `b` and `c`, just index those attributes within object `X` whatever the original source of those attributes is.

HTH

---

<div class="post-metadata">

**Author:** ![elk3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elk3/32/46184_2.png) [@elk3](https://discuss.elastic.co/u/elk3)\
**Post date:** [May 17, 2019, 2:17pm UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097/7 "2019-05-17T14:17:05Z")

</div>

thank for your reply

---

<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:** [June 14, 2019, 2:17pm UTC](https://discuss.elastic.co/t/multiple-index-is-possible/181097/8 "2019-06-14T14:17:19Z")

</div>

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