On Wed, Aug 25, 2010 at 7:22 AM, Eric Grobler <impalah...@googlemail.com> wrote: > Hi Solr experts, > > There is a huge difference doing facet sorting on lex vs count > The strange thing is that count sorting is fast when setting a small limit. > I realize I can do sorting in the client, but I am just curious why this is. > > FAST - 16ms > facet.field=city > f.city.facet.limit=5000 > f.city.facet.sort=lex > > FAST - 20 ms > facet.field=city > f.city.facet.limit=50 > f.city.facet.sort=count > > SLOW - over 1 second > facet.field=city > f.city.facet.limit=5000 > f.city.facet.sort=count
FYI, I just tried my own single-valued faceting test: 10M documents, query matches 1M docs, faceting on a field that has 100,000 unique values: facet.limit=100 -> 35ms facet.limit=5000 -> 44ms facet.limit=50000 -> 100ms The times are reported via QTime (i.e. they do not include the time to write out the response to the client). Maybe you're running into memory issues because of the size of the BoundedTreeSet, response size, etc, and garbage collection is taking up a lot of time? -Yonik http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8