# Type mapping of posts and categories

**URL:** <https://discuss.elastic.co/t/type-mapping-of-posts-and-categories/13272>\
**Category:** Elasticsearch\
**Created:** [August 20, 2013, 3:25pm UTC](https://discuss.elastic.co/t/type-mapping-of-posts-and-categories/13272 "2013-08-20T15:25:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hitchhikar](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@hitchhikar](https://discuss.elastic.co/u/hitchhikar)\
**Post date:** [August 20, 2013, 3:25pm UTC](https://discuss.elastic.co/t/type-mapping-of-posts-and-categories/13272/1 "2013-08-20T15:25:05Z")

</div>

Hi  
I am trying to define mapping for posts and categories it belong to.  
The categories in itself can be nested. Like  
A  
|-------------|  
B C  
|----------|  
D E

So category "E" has name "E" and path "/A/B/E"  
A post can have 1 category associated with it.

Would appreciate if someone can guide me in right direction on how to do it  
efficiently.  
Probably all post of same root category on same shard (parent/child??)

--  
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:20am UTC](https://discuss.elastic.co/t/type-mapping-of-posts-and-categories/13272/2 "2017-07-06T02:20:30Z")

</div>

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


