Facet searching and facet hierarchies.

classic Classic list List threaded Threaded
2 messages Options
A.Z
Reply | Threaded
Open this post in threaded view
|

Facet searching and facet hierarchies.

A.Z
I have a couple of question concerning facet searching.

As I understand, after passing facets to Solr, one must
manually add facet results to search to narrow the search.
ex. i search for "foo bar" and click some facet. must i now
search for 'foo bar facet:value' ? Must I include + signs?
I'm using solrphpclient, maybe there's an API (PHP) that can parse all this?

Another question is facet hierarchies, what's the easiest way
to throw away facets when one is parent of other.
ex. it makes no sense to display 'country' facet when a
'city' facet has been clicked. Storing all facets hardcoded is not possible,
they may change. How is this usually done? Again, any API that can do this?
Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Facet searching and facet hierarchies.

Erik Hatcher

On Mar 26, 2008, at 3:34 PM, A.Z wrote:
> As I understand, after passing facets to Solr, one must
> manually add facet results to search to narrow the search.
> ex. i search for "foo bar" and click some facet. must i now
> search for 'foo bar facet:value' ? Must I include + signs?
> I'm using solrphpclient, maybe there's an API (PHP) that can parse  
> all this?

What you're after in narrowing results by facet constraints is the  
"fq" parameter:
<http://wiki.apache.org/solr/ 
CommonQueryParameters#head-6522ef80f22d0e50d2f12ec487758577506d6002>

> Another question is facet hierarchies, what's the easiest way
> to throw away facets when one is parent of other.
> ex. it makes no sense to display 'country' facet when a
> 'city' facet has been clicked. Storing all facets hardcoded is not  
> possible,
> they may change. How is this usually done? Again, any API that can  
> do this?
>

They may change?  If that is the case they you'd reindex the  
documents that changed to keep them in sync.

As for whether to display a facet or not based on other facets being  
selected, this seems more like a Solr client / UI issue in showing  
the right thing in the right context.

        Erik