How to combine elasticsearch aggregation results to category navigation


#1

Let's say I have infinite hierarchical category menu achieved by some other datastore (In my case should be mongodb). Now I want to add faceted filter feature, I want the category to be recalculated as the user applies a filter. Should hierarchical menu be stored in elasticsearch or should I take two queries from two databases and combine them somehow in my application. I see no easy way I might have a wrong thinking since I am new to elasticsearch. Also I read elasticsearch shouldn't be used as primary database so category should not be stored in it I guess.

-Here I gave two cases as an example to explain better
Case 1: If I go to automobile category it contains lots of sub-categories as car brands and in parentheses it has item counts. As Shown in image below
Also this is the link http://www.sahibinden.com/otomobil

Case 2: The link is here http://www.sahibinden.com/otomobil?price=450001-500000
As I applied price range between 400k&500k sub categories of Otomobil (brands) greatly reduced and their counts as well.

How do I achieve such kind of functionality


#2

@elastiq: did you found a solution? I am just searching for a solution to this problem also....


(system) #3