Yes, you can limit the size of the filter cache, as Erick says, but then, you could just end up with cache churn, where you are constantly re-populating your cache as stuff gets pushed out, only to have to regenerate it again for the next query.
Is it possible to decompose these queries into parts? fq=+category:sport +year:2015 could be better expressed as: fq=category:sport fq=year:2015 Instead of resulting in cardinality(category) * cardinality(year) cache entries, you'd have cardinality(category) + cardinality(year). cardinality() here simply means the number of unique values for that field. Upayavira On Wed, Aug 19, 2015, at 05:23 PM, Erick Erickson wrote: > bq: can I limit the size of the three > caches so that the RAM usage will be under control > > That's exactly what the "size" parameter is for. > > As Upayavira says, the rough size of each entry in > the filterCache is maxDocs/8 + (sizeof query string). > > queryResultCache is much smaller per entry, it's > roughly (sizeof entire query) + ((sizeof Java int) * > <queryResultWindowSize>) > > <queryResultWindowSize> is from solrconfig.xml. The point > here is this is rarely very bug unless you make the > queryResultCache huge. > > As for documentResultCache, it's also usually not > very large, it's the (size you declare it) * (average size of a doc). > > Best, > Erick > > On Wed, Aug 19, 2015 at 9:12 AM, wwang525 <wwang...@gmail.com> wrote: > > Hi Upayavira, > > > > Thank you very much for pointing out the potential design issue > > > > The queries will be determined through a configuration by business users. > > There will be limited number of queries every day, and will get executed by > > customers repeatedly. However, business users will change the configurations > > so that new queries will get generated and also will be limited. The change > > can be as frequent as daily or weekly. The project is to supporting daily > > promotional based on fresh index data. > > > > Cumulatively, there can be a lot of different queries. If I still want to > > take the advantage of the filterCache, can I limit the size of the three > > caches so that the RAM usage will be under control? > > > > Thanks > > > > > > > > -- > > View this message in context: > > http://lucene.472066.n3.nabble.com/Is-it-a-good-query-performance-with-this-data-size-tp4223699p4223960.html > > Sent from the Solr - User mailing list archive at Nabble.com.