lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maria Muslea <maria.mus...@gmail.com>
Subject Re: prefix facet performance
Date Fri, 21 Apr 2017 23:43:46 GMT
I see. Once I specify a prefix the number of terms is MUCH smaller.

Thank you again for all your help.

Maria

On Fri, Apr 21, 2017 at 1:46 PM, Yonik Seeley <yseeley@gmail.com> wrote:

> On Fri, Apr 21, 2017 at 4:25 PM, Maria Muslea <maria.muslea@gmail.com>
> wrote:
> > The field is:
> >
> > <field name="concept" type="string" indexed="true" multiValued="true"/>
> >
> > and using unique() I found that it has 700K+ unique values.
> >
> > The query before (that takes ~10s):
> >
> > wt=json&indent=true&q=*:*&rows=0&facet=true&facet.field=
> concept&facet.prefix=A/
> >
> > the query after (that is almost instant):
> >
> > wt=json&indent=true&q=*:*&rows=0&facet=true&facet.field=
> concept&facet.prefix=A/&facet.method=enum'
>
> Ah, the fact that you specify a facet.prefix makes this perfectly
> aligned for the "enum" method, which can skip directly to the first
> term on-or-after "A/"
> facet.method=enum goes term-by-term, calculating the intersection with
> the facet domain.
> In this case, it's the number of terms that start with "A/" that
> matters, not the number of terms in the entire field (hence the
> speedup).
>
> -Yonik
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message