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 Britske <gb...@gmail.com> on 2007/12/05 10:49:20 UTC
possible to set mincount on facetquery?
is it possible to set a mincount on a facetquery as well as on a facetfield?
I have a situation in which I want to group facetqueries (price-ranges) but
I obviously dont want to show ranges with 0 results.
I tried things like: f.price:[0 TO 50].facet.mincount=1 and f.price:[0 TO
50].query.mincount=1.
Thanks,
Geert-Jan
--
View this message in context: http://www.nabble.com/possible-to-set-mincount-on-facetquery--tf4948462.html#a14168182
Sent from the Solr - User mailing list archive at Nabble.com.
Re: possible to set mincount on facetquery?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
No, facet.query does not support limiting currently. You'll need to
strip those client-side for now.
Erik
On Dec 5, 2007, at 4:49 AM, Britske wrote:
>
> is it possible to set a mincount on a facetquery as well as on a
> facetfield?
> I have a situation in which I want to group facetqueries (price-
> ranges) but
> I obviously dont want to show ranges with 0 results.
>
> I tried things like: f.price:[0 TO 50].facet.mincount=1 and f.price:
> [0 TO
> 50].query.mincount=1.
>
> Thanks,
> Geert-Jan
> --
> View this message in context: http://www.nabble.com/possible-to-set-
> mincount-on-facetquery--tf4948462.html#a14168182
> Sent from the Solr - User mailing list archive at Nabble.com.
Re: possible to set mincount on facetquery?
Posted by Britske <gb...@gmail.com>.
It seemed handy in the mentioned case where its not certain if there are
products in each of the budgetcategories so you simply ask them all, and
only get back the categories which contain at least 1 product.
>From a functional perspective to me that's kind of on par with doing
facet.mincount=1 (the only difference being that the data just doesn't
happen to be in 1 field). However, the client ideally shouldn't need to
bother with that difference imho.
Cheers,
Geert-Jan
Erik Hatcher wrote:
>
>
> On Dec 5, 2007, at 8:33 AM, Yonik Seeley wrote:
>> On Dec 5, 2007 7:45 AM, Erik Hatcher <er...@ehatchersolutions.com>
>> wrote:
>>> On Dec 5, 2007, at 5:12 AM, Erik Hatcher wrote:
>>>> In my perusal of the code (SimpleFacets#getFacetQueryCounts), I'm
>>>> not seeing that facet.query respects facet.limit even. If you
>>>> asked for a count for a query, you get it regardless of any other
>>>> parameters such as mincount or limit.
>>>
>>> sorry, facet.limit doesn't make sense for a facet.query.... what I
>>> meant was that it doesn't support mincount.
>>
>> Right... in most cases I don't think mincount really makes sense for a
>> facet.query either.
>
> I agree with that as well. If you ask for a count for a query, you
> get it regardless of whether it is zero or not. You asked for it,
> you got it!
>
> Erik
>
>
>
--
View this message in context: http://www.nabble.com/possible-to-set-mincount-on-facetquery--tf4948462.html#a14176570
Sent from the Solr - User mailing list archive at Nabble.com.
Re: possible to set mincount on facetquery?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 5, 2007, at 8:33 AM, Yonik Seeley wrote:
> On Dec 5, 2007 7:45 AM, Erik Hatcher <er...@ehatchersolutions.com>
> wrote:
>> On Dec 5, 2007, at 5:12 AM, Erik Hatcher wrote:
>>> In my perusal of the code (SimpleFacets#getFacetQueryCounts), I'm
>>> not seeing that facet.query respects facet.limit even. If you
>>> asked for a count for a query, you get it regardless of any other
>>> parameters such as mincount or limit.
>>
>> sorry, facet.limit doesn't make sense for a facet.query.... what I
>> meant was that it doesn't support mincount.
>
> Right... in most cases I don't think mincount really makes sense for a
> facet.query either.
I agree with that as well. If you ask for a count for a query, you
get it regardless of whether it is zero or not. You asked for it,
you got it!
Erik
Re: possible to set mincount on facetquery?
Posted by Yonik Seeley <yo...@apache.org>.
On Dec 5, 2007 7:45 AM, Erik Hatcher <er...@ehatchersolutions.com> wrote:
> On Dec 5, 2007, at 5:12 AM, Erik Hatcher wrote:
> > In my perusal of the code (SimpleFacets#getFacetQueryCounts), I'm
> > not seeing that facet.query respects facet.limit even. If you
> > asked for a count for a query, you get it regardless of any other
> > parameters such as mincount or limit.
>
> sorry, facet.limit doesn't make sense for a facet.query.... what I
> meant was that it doesn't support mincount.
Right... in most cases I don't think mincount really makes sense for a
facet.query either.
-Yonik
Re: possible to set mincount on facetquery?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 5, 2007, at 5:12 AM, Erik Hatcher wrote:
> In my perusal of the code (SimpleFacets#getFacetQueryCounts), I'm
> not seeing that facet.query respects facet.limit even. If you
> asked for a count for a query, you get it regardless of any other
> parameters such as mincount or limit.
sorry, facet.limit doesn't make sense for a facet.query.... what I
meant was that it doesn't support mincount.
Re: possible to set mincount on facetquery?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
In my perusal of the code (SimpleFacets#getFacetQueryCounts), I'm not
seeing that facet.query respects facet.limit even. If you asked for
a count for a query, you get it regardless of any other parameters
such as mincount or limit.
Erik
p.s. I also notice that facet.query always uses the SolrQueryParser
rather than a pluggable QParser implementation. We should switch
that, eh?
On Dec 5, 2007, at 5:00 AM, Dilip.TS wrote:
> Hi,
> Ideally the params.put("facet.mincount","1"); used for the facet
> search
> should do the same.
> It works fine in my case.
> Regards
> Dilip.
>
> -----Original Message-----
> From: Britske [mailto:gbrits@gmail.com]
> Sent: Wednesday, December 05, 2007 3:19 PM
> To: solr-user@lucene.apache.org
> Subject: possible to set mincount on facetquery?
>
>
>
> is it possible to set a mincount on a facetquery as well as on a
> facetfield?
> I have a situation in which I want to group facetqueries (price-
> ranges) but
> I obviously dont want to show ranges with 0 results.
>
> I tried things like: f.price:[0 TO 50].facet.mincount=1 and f.price:
> [0 TO
> 50].query.mincount=1.
>
> Thanks,
> Geert-Jan
> --
>
> #a14168182
> Sent from the Solr - User mailing list archive at Nabble.com.
RE: possible to set mincount on facetquery?
Posted by "Dilip.TS" <di...@starmarksv.com>.
Hi,
Ideally the params.put("facet.mincount","1"); used for the facet search
should do the same.
It works fine in my case.
Regards
Dilip.
-----Original Message-----
From: Britske [mailto:gbrits@gmail.com]
Sent: Wednesday, December 05, 2007 3:19 PM
To: solr-user@lucene.apache.org
Subject: possible to set mincount on facetquery?
is it possible to set a mincount on a facetquery as well as on a facetfield?
I have a situation in which I want to group facetqueries (price-ranges) but
I obviously dont want to show ranges with 0 results.
I tried things like: f.price:[0 TO 50].facet.mincount=1 and f.price:[0 TO
50].query.mincount=1.
Thanks,
Geert-Jan
--
#a14168182
Sent from the Solr - User mailing list archive at Nabble.com.