SolrCache implementations LRUCache, FastLRUCache and LFUCache have a
parameter initialSize, that is passed directly to HashMap initialCapacity
constructor argument. 

For LFUCache this is the code line:

 

map = new LinkedHashMap<K,V>(initialSize, 0.75f, true) .

 

In solrconfig.xml I tried to set initialSize to be size/0.75 + some_more,
but it's impossible to set value greather than size because of this line:

 

final int initialSize = Math.min(str==null ? 1024 : Integer.parseInt(str),
limit);

 

For FastLRUCache there is no such limitation, but still I think
documentation and default values in solrconfig.xml should not use equal
values for initialSize and size.

Reply via email to