lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: prefix facet performance
Date Fri, 21 Apr 2017 20:46:17 GMT
On Fri, Apr 21, 2017 at 4:25 PM, Maria Muslea <> 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


View raw message