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 "Matt M." <go...@gmail.com> on 2008/02/29 23:37:43 UTC
Facet numFound for facet values?
Hi,
I'm trying to find a way to paginate through facet values. But it seems that
there is not a way to get the total number of values (numFound) under a
given facet field? For example, if I have a facet field called
"composition_era_facet" and the values are:
15th Century
16th Century
17th Century
18th Century
19th Century
20th Century
and I want pagination with 3 of those values per page, how do I calculate
the total pages? Or get the "numFound"?
Thank you,
Matt
Re: Facet numFound for facet values?
Posted by "Matt M." <go...@gmail.com>.
OK no problem. Thanks for explaining that to me. Actually it makes my life
easier :)
Matt
On Sat, Mar 1, 2008 at 5:53 PM, Yonik Seeley <yo...@apache.org> wrote:
> On Sat, Mar 1, 2008 at 5:43 PM, Matt M. <go...@gmail.com> wrote:
> > So if my facet fields (and values) are changing depending on the
> > query/filters I have set, it sounds like it is not currently possible
> to
> > paginate through a single, facet field's values using a "total pages"
> value?
>
> Right.
>
> A feature like that could be developed, but the cost is not simply a
> counter... it would mean extra CPU since the current facet code
> short-circuits evaluation of some facets, and that would not be
> possible if one is trying to calculate that exact number.
>
> -Yonik
>
Re: Facet numFound for facet values?
Posted by Yonik Seeley <yo...@apache.org>.
On Sat, Mar 1, 2008 at 5:43 PM, Matt M. <go...@gmail.com> wrote:
> So if my facet fields (and values) are changing depending on the
> query/filters I have set, it sounds like it is not currently possible to
> paginate through a single, facet field's values using a "total pages" value?
Right.
A feature like that could be developed, but the cost is not simply a
counter... it would mean extra CPU since the current facet code
short-circuits evaluation of some facets, and that would not be
possible if one is trying to calculate that exact number.
-Yonik
Re: Facet numFound for facet values?
Posted by "Matt M." <go...@gmail.com>.
Hi,
So if my facet fields (and values) are changing depending on the
query/filters I have set, it sounds like it is not currently possible to
paginate through a single, facet field's values using a "total pages" value?
Thanks,
Matt
On Fri, Feb 29, 2008 at 6:09 PM, Yonik Seeley <yo...@apache.org> wrote:
> On Fri, Feb 29, 2008 at 5:37 PM, Matt M. <go...@gmail.com> wrote:
> > I'm trying to find a way to paginate through facet values. But it seems
> that
> > there is not a way to get the total number of values (numFound) under a
> > given facet field?
>
> If you include zero counts, it's the same for every query, and you
> could get the total number of terms in a field from the luke handler.
> Otherwise, that info is not calculated, and would be much more
> expensive to calculate.
>
> -Yonik
>
Re: Facet numFound for facet values?
Posted by Yonik Seeley <yo...@apache.org>.
On Fri, Feb 29, 2008 at 5:37 PM, Matt M. <go...@gmail.com> wrote:
> I'm trying to find a way to paginate through facet values. But it seems that
> there is not a way to get the total number of values (numFound) under a
> given facet field?
If you include zero counts, it's the same for every query, and you
could get the total number of terms in a field from the luke handler.
Otherwise, that info is not calculated, and would be much more
expensive to calculate.
-Yonik