Just wondering if it is possible to generate individual facet links.

I have added taxonomy terms from a tags vocabulary to my search results.
I was hoping to be able to change the tag links so taht they are actually facets.

Is there a way I can generate a facet url given I have the term ID and all that?

I'm sure I can hack together something that works but just wondering if there is a proper way to do somthing like this.

Comments

nick_vh’s picture

Project: Apache Solr Search » Facet API
Component: Code » Code (functionality)

It sure is but you will have to look at facetapi for that :)
Moving it accordingly

cpliakas’s picture

Hi rooby.

The FacetapiAdapter::getSearchPath() and FacetapiAdapter::getQueryString() methods should give you enough to build the links.

Thanks,
Chris

rooby’s picture

Status: Active » Fixed

Thank you, that's great.

jyg’s picture

Sorry for my lack of PHP OO expertise, but how can I instantiate the class necessary to run these functions?

cpliakas’s picture

No OO expertise required! The facetapi_adapter_load() API function will return the instantiated object.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.