: I believe I'll need to write some custom code to accomplish what I want
: (efficiently that is) but I'm unsure of what would be the best route to
: take. Will this require a custom request handler? Search component? 

You'll need a customized version of the FacetComponent if you want to do 
this all on the server side.

: We have a similar category structure whereas we have top level-categories
: and then sub-categories. I want to be able to perform a search and then only
: return the top 3 top-level categories with their sub-categories also
: faceted. The problem is I don't know what those top 3 top-level categories
: are until after I search.

the main complexity with a situation like this is how you model it.  
regardless of wether you do it server side or client side the straight 
forward appraoch is to do basic faceting on a "top level" category field, 
and then given the top three responses do secondary faceting o na field 
that contains the full category "breadcrumb" -- either using something 
like facet.prefix or by walking some other in memory data structure 
represending your category graph that lets you access the children of a 
particular category (depends wether you need complex rules to identify 
what documents are in a category)

: Second way. Have the client send multiple requests on the backend. First to
: determine the top 3 categories, then another for all the subcategories. This
: involves more client side coding and I would prefer not to perform 2x the
: requests. If at all possible I would like to do this on the Solr side.

...you've already got the conceptual model of how to do it, all you need 
now is to implement it as a Component that does the secondary-faceting in 
the same requests (which should definitley be more efficient since you can 
reuse the DocSets) instead of issuing secondary requets from your client



-Hoss

Reply via email to