# Two-level index ElasticSearch

**URL:** <https://discuss.elastic.co/t/two-level-index-elasticsearch/11699>\
**Category:** Elasticsearch\
**Created:** [April 26, 2013, 7:03am UTC](https://discuss.elastic.co/t/two-level-index-elasticsearch/11699 "2013-04-26T07:03:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grina](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@Grina](https://discuss.elastic.co/u/Grina)\
**Post date:** [April 26, 2013, 7:03am UTC](https://discuss.elastic.co/t/two-level-index-elasticsearch/11699/1 "2013-04-26T07:03:38Z")

</div>

Is it possible to create index of structure like this:

localhost:9200/shopname/products/product

where "shopname/products" is composite index, and "product" is type?

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [April 26, 2013, 7:16am UTC](https://discuss.elastic.co/t/two-level-index-elasticsearch/11699/2 "2013-04-26T07:16:47Z")

</div>

Hello,

No, it's not possible, as far as I know.

But you can put a field in your documents to filter out different types,  
for example to have

localhost:9200/shopname/products

and then "document\_type": "product" in the document itself. That's actually  
how Elasticsearch does it with types in the background. The type is an  
additional field, as all documents from various types will end up in the  
same Lucene indices.

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Fri, Apr 26, 2013 at 10:03 AM, Grina [guchiom@gmail.com](mailto:guchiom@gmail.com) wrote:

> Is it possible to create index of structure like this:
> 
> localhost:9200/shopname/products/product
> 
> where "shopname/products" is composite index, and "product" is type?
> 
> Thanks!
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Grina](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@Grina](https://discuss.elastic.co/u/Grina)\
**Post date:** [April 26, 2013, 10:01am UTC](https://discuss.elastic.co/t/two-level-index-elasticsearch/11699/3 "2013-04-26T10:01:24Z")

</div>

Thanks!!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:39am UTC](https://discuss.elastic.co/t/two-level-index-elasticsearch/11699/4 "2017-07-06T02:39:31Z")

</div>

Closed on July 6, 2017, 2:39am UTC


