tokee / lucene-solr

High cardinality faceting (SOLR-5894)
http://tokee.github.io/lucene-solr/
7 stars 1 forks source link

Make the maxCount calculation lazy for faster startup #25

Closed tokee closed 9 years ago

tokee commented 9 years ago

In order to minimize memory usage for facet counters, a full facet count is performed upon index change. For large indexes this introduces a noticeable delay. The maxCount is only needed when using packed counters, so lazy evaluation would ensure the penalty is only paid when necessary.

tokee commented 9 years ago

In order to properly guess if the result will be sparse, a full run through of the ordinal counts is necessary to calculate the number of references. maxCount is a nearly free add-on to that analysis.