# Amazon like sub-categories navigation

**URL:** https://discuss.elastic.co/t/amazon-like-sub-categories-navigation/35535
**Category:** Elasticsearch
**Created:** [November 25, 2015, 10:05am UTC](https://discuss.elastic.co/t/amazon-like-sub-categories-navigation/35535 "2015-11-25T10:05:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sibi](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@Sibi](https://discuss.elastic.co/u/Sibi)
#### Post date: [November 25, 2015, 10:05am UTC](https://discuss.elastic.co/t/amazon-like-sub-categories-navigation/35535/1 "2015-11-25T10:05:14Z")

</div>

Hello everyone,

I am going to use Elasticsearch in my next project - first time.  
And this is my first question here - I hope it is proper place.

I need some keywords, which help me do the best Elasticsearch mapping to display results count in (sub)\*categories, like this:

Computers:

- Notebooks (100)
- Software (300)
- Accessories (200)

If user click to Notebooks subcategory, in the next page see:

Notebooks:

- Lenowo (23)
- Asus (34)
- Acer(23)

etc. So number of subcategories deep of subtree can be different in each branch.  
I am going to use the latest version Elasticsearch (now 2.0.0), so maby some informations in web are no acctual.  
I found some topics here:

> <https://stackoverflow.com/questions/20618183/hierarchical-faceting-with-elasticsearch>

  
[http://blog.florian-hopf.de/2014/03/building-navigation-from-search-index.html](http://blog.florian-hopf.de/2014/03/building-navigation-from-search-index.html)

but still no sure how t store categories in more efficient way:  
as path: /Computers/Notebooks/Acer  
or as number/id or Parent-Child Relationship documents.

And of course index products with this categories to make search engine fast.

Please give me some advice.

---

<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 5, 2017, 11:35pm UTC](https://discuss.elastic.co/t/amazon-like-sub-categories-navigation/35535/2 "2017-07-05T23:35:57Z")

</div>


