First Thanks very much for your answers, and Alan's one >> 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? When I said it failed, I just meant I was a little bit slower. >> 2/ I tried facet.threads=-1 in my queries, 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)? The "slow" request corresponds to our website search query. It for our book catalog: some facets are for type of documents, author, title subjets, location of the book, dates... In this request we have now 35 facets. About unique value, for the "slow" query: 1 facet goes up to 4M unique values (authors), 1 facet has 250.000 uniques values 1 have 50000 1 have 6700 4 have between 300 and 1000 5 have between 100 and 160 16 have less than 65 >> 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/ Right now we use solr 4.6, and we soon deliver our relsease, and I'm afraid I won't have time to try this time, but I can try for next release (next month I think). Thanks very much again Jerome Dupont jerome.dupont_at#bnf.fr Participez à l'acquisition d'un Trésor national - Le manuscrit royal de François I er Avant d'imprimer, pensez à l'environnement.