Facet numFound for facet values?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Facet numFound for facet values?

Matt Mitchell
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
Reply | Threaded
Open this post in threaded view
|

Re: Facet numFound for facet values?

Yonik Seeley-2
On Fri, Feb 29, 2008 at 5:37 PM, Matt M. <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Facet numFound for facet values?

Matt Mitchell
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 <[hidden email]> wrote:

> On Fri, Feb 29, 2008 at 5:37 PM, Matt M. <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Facet numFound for facet values?

Yonik Seeley-2
On Sat, Mar 1, 2008 at 5:43 PM, Matt M. <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Facet numFound for facet values?

Matt Mitchell
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 <[hidden email]> wrote:

> On Sat, Mar 1, 2008 at 5:43 PM, Matt M. <[hidden email]> 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
>