You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Way Cool <wa...@gmail.com> on 2011/07/05 19:15:51 UTC

Dynamic Facets

Hi, guys,

We have more than 1000 attributes scattered around 700K docs. Each doc might
have about 50 attributes. I would like Solr to return up to 20 facets for
every searches, and each search can return facets dynamically depending on
the matched docs. Anyone done that before? That'll be awesome if the facets
returned will be changed after we drill down facets.

I have looked at the following docs:
http://wiki.apache.org/solr/SimpleFacetParameters
http://www.lucidimagination.com/devzone/technical-articles/faceted-search-solr

Wondering what's the best way to accomplish that. Any advice?

Thanks,

YH

Re: Dynamic Facets

Posted by Way Cool <wa...@gmail.com>.
Thanks Erik and Darren.
A pre-faceting component (post querying) will be ideal as though maybe a
little performance penalty there. :-) I will try to implement one if no one
has done so.

Darren, I did look at the taxonomy faceting thread. My main concern is that
I want to have dynamic facets to be returned because I don't know what
facets I can specify as a part of query ahead of time, and there are too
many search terms. ;-)

Thanks for help.

On Tue, Jul 5, 2011 at 11:49 AM, <da...@ontrenet.com> wrote:

>
> You can issue a new facet search as you drill down from your UI.
> You have to specify the fields you want to facet on and they can be
> dynamic.
>
> Take a look at recent threads here on taxonomy faceting for help.
> Also, look here[1]
>
> [1] http://wiki.apache.org/solr/SimpleFacetParameters
>
> On Tue, 5 Jul 2011 11:15:51 -0600, Way Cool <wa...@gmail.com>
> wrote:
> > Hi, guys,
> >
> > We have more than 1000 attributes scattered around 700K docs. Each doc
> > might
> > have about 50 attributes. I would like Solr to return up to 20 facets
> for
> > every searches, and each search can return facets dynamically depending
> on
> > the matched docs. Anyone done that before? That'll be awesome if the
> facets
> > returned will be changed after we drill down facets.
> >
> > I have looked at the following docs:
> > http://wiki.apache.org/solr/SimpleFacetParameters
> >
>
> http://www.lucidimagination.com/devzone/technical-articles/faceted-search-solr
> >
> > Wondering what's the best way to accomplish that. Any advice?
> >
> > Thanks,
> >
> > YH
>

Re: Dynamic Facets

Posted by da...@ontrenet.com.
You can issue a new facet search as you drill down from your UI.
You have to specify the fields you want to facet on and they can be
dynamic.

Take a look at recent threads here on taxonomy faceting for help.
Also, look here[1]

[1] http://wiki.apache.org/solr/SimpleFacetParameters

On Tue, 5 Jul 2011 11:15:51 -0600, Way Cool <wa...@gmail.com>
wrote:
> Hi, guys,
> 
> We have more than 1000 attributes scattered around 700K docs. Each doc
> might
> have about 50 attributes. I would like Solr to return up to 20 facets
for
> every searches, and each search can return facets dynamically depending
on
> the matched docs. Anyone done that before? That'll be awesome if the
facets
> returned will be changed after we drill down facets.
> 
> I have looked at the following docs:
> http://wiki.apache.org/solr/SimpleFacetParameters
>
http://www.lucidimagination.com/devzone/technical-articles/faceted-search-solr
> 
> Wondering what's the best way to accomplish that. Any advice?
> 
> Thanks,
> 
> YH

Re: Dynamic Facets

Posted by Erik Hatcher <er...@gmail.com>.
YH -

One technique (that the Smithsonian employs, I believe) is a technique to index the field names for the attributes into a separate field, facet on that first, and then facet on the fields you'd like from that response in a second request to Solr.

There's a basic hack here so the indexing client doesn't need to add the "fields used" field: <https://issues.apache.org/jira/browse/SOLR-1280>

Ideally, this could all be made part of one request to Solr - and I can envision a pre-faceting component (post querying) to dynamically figure out the best fields to facet on, set those into the request context, and the rest is magic.

	Erik



On Jul 5, 2011, at 13:15 , Way Cool wrote:

> Hi, guys,
> 
> We have more than 1000 attributes scattered around 700K docs. Each doc might
> have about 50 attributes. I would like Solr to return up to 20 facets for
> every searches, and each search can return facets dynamically depending on
> the matched docs. Anyone done that before? That'll be awesome if the facets
> returned will be changed after we drill down facets.
> 
> I have looked at the following docs:
> http://wiki.apache.org/solr/SimpleFacetParameters
> http://www.lucidimagination.com/devzone/technical-articles/faceted-search-solr
> 
> Wondering what's the best way to accomplish that. Any advice?
> 
> Thanks,
> 
> YH