RE: Retrieving multiple levels with hierarchical faceting in Solr

2012-03-04 Thread adrian.strin...@holidaylettings.co.uk
At the moment, I'm just using a multi-valued string field.  I was previously 
using a text field that was defined as follows:








I've tried to have a look on the net, but I can't seem to find any 
documentation on the difference between specifying a facet prefix using 
f.facetname.facet.prefix and using local params - if anyone could point me in 
the right direction it'd be much appreciated.  From what I can see, it appears 
that my Solr instance just ignores the prefix when supplied via local params.  
I suspect that, as I don't know much about Solr, I'm probably just searching 
for the wrong phrases :(

Regards,
Ade

-Original Message-
From: Erick Erickson [mailto:erickerick...@gmail.com] 
Sent: 03 March 2012 00:36
To: solr-user@lucene.apache.org
Subject: Re: Retrieving multiple levels with hierarchical faceting in Solr

A lot depends on the analysis chain your field is actually using, that is the 
tokens that are in the index. Can you supply the schema.xml file for the field 
in question?

Best
Erick

On Fri, Mar 2, 2012 at 7:21 AM, adrian.strin...@holidaylettings.co.uk
 wrote:
> I've got a hierarchical facet in my Solr collection; root level values are 
> prefixed with 0;, and the next level is prefixed 1_foovalue;.  I can get the 
> root level easily enough, but when foovalue is selected I need to retrieve 
> the next level in the hierarchy while still displaying all of the options in 
> the root level.  I can't work out how to request either two different 
> prefixes for the facet, or the same facet twice using different prefixes.
>
> I've found a couple of discussions online that suggest I ought to be able to 
> set the prefix using local params:
>
>    facet.field={!prefix=0;}foo
>    facet.field={!prefix=1_foovalue; key=bar}foo
>
> but the prefix seems to be ignored, as the facet returned contains all 
> values.  Should I just  so I can query 
> using f.foo.facet.prefix=0;&f.bar.facet.prefix=1_foovalue;, or is there 
> another way I can request the two different levels of my facet hierarchy at 
> once?
>
> I'm using Solr 3.5.
>
> Thanks,
> Ade
>


Retrieving multiple levels with hierarchical faceting in Solr

2012-03-02 Thread adrian.strin...@holidaylettings.co.uk
I've got a hierarchical facet in my Solr collection; root level values are 
prefixed with 0;, and the next level is prefixed 1_foovalue;.  I can get the 
root level easily enough, but when foovalue is selected I need to retrieve the 
next level in the hierarchy while still displaying all of the options in the 
root level.  I can't work out how to request either two different prefixes for 
the facet, or the same facet twice using different prefixes.

I've found a couple of discussions online that suggest I ought to be able to 
set the prefix using local params:

facet.field={!prefix=0;}foo
facet.field={!prefix=1_foovalue; key=bar}foo

but the prefix seems to be ignored, as the facet returned contains all values.  
Should I just  so I can query using 
f.foo.facet.prefix=0;&f.bar.facet.prefix=1_foovalue;, or is there another way I 
can request the two different levels of my facet hierarchy at once?

I'm using Solr 3.5.

Thanks,
Ade