I have Elasticsearch cluster with e-shop data. There are many product in 
there and they have attributes which belong to attribute categories. When I 
search I don't know which attribute category are going to be returned and I 
need facet statistic for every one of them. 


E.g. documents look like:

{ 

"doc": "doc1",

 categories: { "f1": "a", "f2": 0, "f3": "b", } 

}, 

{ 

"doc": "doc2", 

categories: { "f2": 3, "f3": "c", "f4": "d", }

}

I need to get facets statistic for every key in categories part of document 
e.g. statistic for f1, f2, f3 etc. and I need to get it in one query (not 
to get all categories first and then issue second query for actual 
data)...It is ok if I have to change data structure. Is it possible to 
do this using facets or aggregations in Elasticsearch?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/a9ac8ce6-14d0-44dd-9721-a3ba75477aaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to