jerome.dup...@bnf.fr [jerome.dup...@bnf.fr] wrote:
> I have a solr index (12 M docs, 45Go) with facets, and I'm trying to
> improve facet queries performances.
> 1/ I tried to use docvalue on facet fields, it didn't work well

That was surprising, as the normal result of switching to DocValues is 
positive. Can you elaborate on what you did and how it failed?

> 2/ I tried facet.threads=-1 in my querie, and worked perfectely (from more
> 15s  to 2s for longest queries)

That tells us that your primary problem is not IO. If your usage is normally 
single-threaded that can work, but it also means that you have a lot of CPU 
cores standing idle most of the time. How many fields are you using for 
faceting and how many of them are large (more unique values than the 5000 you 
mention)?

> 3/ I'm trying to use facet.method=enum. It's supposed to improve the
> performance for facets fileds with few differents values. (type of
> documents, things like that)

Having a mix of facet methods seems like a fine idea, although my personal 
experience is that enums gets slower than fc quite earlier than the 5000 unique 
values mark. As Alan states, the call is f.myfacetfield.facet.method=enum 
(Remember the 'facet.'-part. See 
https://wiki.apache.org/solr/SimpleFacetParameters#Parameters for details).

Or you could try Sparse Faceting (Disclaimer: I am the author), which seems to 
fit your setup very well: http://tokee.github.io/lucene-solr/

- Toke Eskildsen

Reply via email to