I am completely new in solr and have the issue to have to go on developing our new search-engine, because my collegue is is not here anymore.
My problem:
I want to get facetted (hierarchical)categories with itemcount.
example
Search for 'Galaxy'
Items found: 123
Shown Categories:
Electronics (83)
Mobiles (60)
Tablets (23)
Smartphones (37)
.....
Books (40)
....
....
my category-fields (in solr) for each article contain several category-trees, seperated by comma.
e.g.:
"categories_raw": "Electronics/Mobiles/Tablets,Books/MobilePhones"
A query sent to my solr with the following parameters results facet_fields with item counts, but only with counts from the items own subcategory:
q=samsung&q.alt=samsung&...&facet=true&facet.field=categories_raw&facet.mincount=1
results (at the end of resulting JSON):
"facet_counts": {
"facet_queries": {},
"facet_fields": {
"categories_raw": [
"Electronics/Mobiles/Smartphones",
37,
"Books/MobilePhones",
20,
....
How can I get a count on each category like on my example on top?
Is it possible to break down my hierarchical category-string in field "categories_raw" by solr? Did I miss something?
Hope someone could help ;) thx