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 David Yang <dy...@nextjump.com> on 2010/11/18 00:09:04 UTC
Per field facet limit
Hi,
The wiki on facet.limit
(http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit) says
"This parameter can be specified on a per field basis to indicate a
separate limit for certain fields." But it is not specified how to
specify a specific field. How do you do this?
I tried
<str name="facet.field">a_id</str>
<int name="a_id.facet.mincount">30</int>
<str name="facet.field">b_id</str>
<int name="b_id.facet.mincount">3</int>
Which didn't work, as well as plain 'facet.mincount' twice which also
didn't work.
Cheers,
David.
Re: Per field facet limit
Posted by Chris Hostetter <ho...@fucit.org>.
: The wiki on facet.limit
: (http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit) says
: "This parameter can be specified on a per field basis to indicate a
: separate limit for certain fields." But it is not specified how to
: specify a specific field. How do you do this?
it's explained at the top of the Parameters section...
http://wiki.apache.org/solr/SimpleFacetParameters#Parameters
>> Note that many parameters may be overridden on a per-field basis with
>> the following syntax:
>>
>> * f.<fieldName>.<FacetParam>=<value>
>> ...
...and then there is an example
-Hoss
RE: Per field facet limit
Posted by David Yang <dy...@nextjump.com>.
Sorry for the typo, I meant mincount, not limit... :p
Cheers,
David
-----Original Message-----
From: David Yang [mailto:dyang@nextjump.com]
Sent: Wednesday, November 17, 2010 6:15 PM
To: solr-user@lucene.apache.org
Subject: RE: Per field facet limit
Thanks!
Is there any way to apply this to facet queries as well?
(I could just apply a f.field.facet.limit to each and every field, and
then apply a global facet.limit for facet queries.)
Cheers
david
-----Original Message-----
From: Jonathan Rochkind [mailto:rochkind@jhu.edu]
Sent: Wednesday, November 17, 2010 6:12 PM
To: solr-user@lucene.apache.org
Subject: Re: Per field facet limit
f.name_of_field.facet.limit
The f.name_of_field.original_value thing is a common pattern in Solr,
but, yeah, sometimes it's hard to find it in the documentation.
So same with any of the other facet parameters.
f.name_of_field.facet.mincount, whatever.
David Yang wrote:
> Hi,
>
>
>
> The wiki on facet.limit
> (http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit) says
> "This parameter can be specified on a per field basis to indicate a
> separate limit for certain fields." But it is not specified how to
> specify a specific field. How do you do this?
>
>
>
> I tried
>
>
>
> <str name="facet.field">a_id</str>
>
> <int name="a_id.facet.mincount">30</int>
>
>
>
> <str name="facet.field">b_id</str>
>
> <int name="b_id.facet.mincount">3</int>
>
>
>
> Which didn't work, as well as plain 'facet.mincount' twice which also
> didn't work.
>
>
>
> Cheers,
>
> David.
>
>
>
RE: Per field facet limit
Posted by David Yang <dy...@nextjump.com>.
Makes sense. The processing is already done and there is no reason to
not return it, since it is wont explode into a horribly long list,
unlike a field facet.
Thanks!
-----Original Message-----
From: Jonathan Rochkind [mailto:rochkind@jhu.edu]
Sent: Wednesday, November 17, 2010 6:21 PM
To: solr-user@lucene.apache.org
Subject: Re: Per field facet limit
I don't think a facet.limit or facet.mincount apply to facet queries,
it's not applicable, whether global or field-specific.
Keep in mind that a single facet query just returns ONE count, for the
query you supplied. It's up to you to supply a query that will give the
count you want, it won't use facet.limit or facet.mincount, those
parameters apply to ordinary facetting where you get many values per
field, to filter the values per field. Each facet.query only gives you
one count already.
David Yang wrote:
> Thanks!
>
> Is there any way to apply this to facet queries as well?
> (I could just apply a f.field.facet.limit to each and every field, and
> then apply a global facet.limit for facet queries.)
>
> Cheers
> david
>
> -----Original Message-----
> From: Jonathan Rochkind [mailto:rochkind@jhu.edu]
> Sent: Wednesday, November 17, 2010 6:12 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Per field facet limit
>
> f.name_of_field.facet.limit
>
> The f.name_of_field.original_value thing is a common pattern in Solr,
> but, yeah, sometimes it's hard to find it in the documentation.
>
> So same with any of the other facet parameters.
> f.name_of_field.facet.mincount, whatever.
>
> David Yang wrote:
>
>> Hi,
>>
>>
>>
>> The wiki on facet.limit
>> (http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit) says
>> "This parameter can be specified on a per field basis to indicate a
>> separate limit for certain fields." But it is not specified how to
>> specify a specific field. How do you do this?
>>
>>
>>
>> I tried
>>
>>
>>
>> <str name="facet.field">a_id</str>
>>
>> <int name="a_id.facet.mincount">30</int>
>>
>>
>>
>> <str name="facet.field">b_id</str>
>>
>> <int name="b_id.facet.mincount">3</int>
>>
>>
>>
>> Which didn't work, as well as plain 'facet.mincount' twice which also
>> didn't work.
>>
>>
>>
>> Cheers,
>>
>> David.
>>
>>
>>
>>
>
>
Re: Per field facet limit
Posted by Jonathan Rochkind <ro...@jhu.edu>.
I don't think a facet.limit or facet.mincount apply to facet queries,
it's not applicable, whether global or field-specific.
Keep in mind that a single facet query just returns ONE count, for the
query you supplied. It's up to you to supply a query that will give the
count you want, it won't use facet.limit or facet.mincount, those
parameters apply to ordinary facetting where you get many values per
field, to filter the values per field. Each facet.query only gives you
one count already.
David Yang wrote:
> Thanks!
>
> Is there any way to apply this to facet queries as well?
> (I could just apply a f.field.facet.limit to each and every field, and
> then apply a global facet.limit for facet queries.)
>
> Cheers
> david
>
> -----Original Message-----
> From: Jonathan Rochkind [mailto:rochkind@jhu.edu]
> Sent: Wednesday, November 17, 2010 6:12 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Per field facet limit
>
> f.name_of_field.facet.limit
>
> The f.name_of_field.original_value thing is a common pattern in Solr,
> but, yeah, sometimes it's hard to find it in the documentation.
>
> So same with any of the other facet parameters.
> f.name_of_field.facet.mincount, whatever.
>
> David Yang wrote:
>
>> Hi,
>>
>>
>>
>> The wiki on facet.limit
>> (http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit) says
>> "This parameter can be specified on a per field basis to indicate a
>> separate limit for certain fields." But it is not specified how to
>> specify a specific field. How do you do this?
>>
>>
>>
>> I tried
>>
>>
>>
>> <str name="facet.field">a_id</str>
>>
>> <int name="a_id.facet.mincount">30</int>
>>
>>
>>
>> <str name="facet.field">b_id</str>
>>
>> <int name="b_id.facet.mincount">3</int>
>>
>>
>>
>> Which didn't work, as well as plain 'facet.mincount' twice which also
>> didn't work.
>>
>>
>>
>> Cheers,
>>
>> David.
>>
>>
>>
>>
>
>
RE: Per field facet limit
Posted by David Yang <dy...@nextjump.com>.
Thanks!
Is there any way to apply this to facet queries as well?
(I could just apply a f.field.facet.limit to each and every field, and
then apply a global facet.limit for facet queries.)
Cheers
david
-----Original Message-----
From: Jonathan Rochkind [mailto:rochkind@jhu.edu]
Sent: Wednesday, November 17, 2010 6:12 PM
To: solr-user@lucene.apache.org
Subject: Re: Per field facet limit
f.name_of_field.facet.limit
The f.name_of_field.original_value thing is a common pattern in Solr,
but, yeah, sometimes it's hard to find it in the documentation.
So same with any of the other facet parameters.
f.name_of_field.facet.mincount, whatever.
David Yang wrote:
> Hi,
>
>
>
> The wiki on facet.limit
> (http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit) says
> "This parameter can be specified on a per field basis to indicate a
> separate limit for certain fields." But it is not specified how to
> specify a specific field. How do you do this?
>
>
>
> I tried
>
>
>
> <str name="facet.field">a_id</str>
>
> <int name="a_id.facet.mincount">30</int>
>
>
>
> <str name="facet.field">b_id</str>
>
> <int name="b_id.facet.mincount">3</int>
>
>
>
> Which didn't work, as well as plain 'facet.mincount' twice which also
> didn't work.
>
>
>
> Cheers,
>
> David.
>
>
>
Re: Per field facet limit
Posted by Jonathan Rochkind <ro...@jhu.edu>.
f.name_of_field.facet.limit
The f.name_of_field.original_value thing is a common pattern in Solr,
but, yeah, sometimes it's hard to find it in the documentation.
So same with any of the other facet parameters.
f.name_of_field.facet.mincount, whatever.
David Yang wrote:
> Hi,
>
>
>
> The wiki on facet.limit
> (http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit) says
> "This parameter can be specified on a per field basis to indicate a
> separate limit for certain fields." But it is not specified how to
> specify a specific field. How do you do this?
>
>
>
> I tried
>
>
>
> <str name="facet.field">a_id</str>
>
> <int name="a_id.facet.mincount">30</int>
>
>
>
> <str name="facet.field">b_id</str>
>
> <int name="b_id.facet.mincount">3</int>
>
>
>
> Which didn't work, as well as plain 'facet.mincount' twice which also
> didn't work.
>
>
>
> Cheers,
>
> David.
>
>
>