You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2006/09/19 23:45:30 UTC

[Solr Wiki] Update of "SolrCaching" by HossMan

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The following page has been changed by HossMan:
http://wiki.apache.org/solr/SolrCaching

------------------------------------------------------------------------------
  
  There is currently only one cache implementation &#151; solr.search.LRUCache (LRU = Least Recently Used in memory).
   
- = Cache Configurations =
  
- Caching configuration is set-up in the Query section of [:SolrConfigXml:solrconfig.xml]. You can set the parameters of the four types of caches:
+ = Cache Configuration =
  
+ Caching configuration is set-up in the Query section of [:SolrConfigXml:solrconfig.xml].  For most caches, you can set the following parameters....
-    * filterCache
-    * queryResultCache
-    * documentCache
-    * User/Generic Caches
  
+ == class ==
+ 
+ The `SolrCache` implementation you wish to use (currently only `LRUCache` is supported out of the box)
+ 
+ == size ==
+ 
+ The maximum number of entries in the cache.
+ 
+ == initialSize ==
+ 
+ The initial capacity (number of entries) of the cache.  (seel `java.util.HashMap`)
+ 
- == autoWarming ==
+ == autowarmCount ==
+ 
+ The number of entries to prepopulate from and old cache.
  
  When a new searcher is opened, its caches may be prepopulated or "autowarmed" with cached object from caches in the old searcher. autowarmCount is the number of cached items that will be regenerated in the new searcher. You will proably want to base the autowarmCount setting on how long it takes to autowarm. You must consider the trade-off — time-to-autowarm versus how warm (i.e., autowarmCount) you want the cache to be. The autowarm parameter is set for the caches in solrconfig.xml.
+ 
+ = Types of Caches and Example Configuration =
  
  Below we present the cache-specific parts of the solrconfig.xml file and its recommended settings:
  
@@ -42, +54 @@

        initialSize="4096"
        autowarmCount="4096"/>
  }}}
- '''autowarmCount''' is the number of items that will be pre-populated.
  
  == queryResultCache ==
  
@@ -58, +69 @@

        initialSize="4096"
        autowarmCount="1024"/>
  }}}
- 
- '''autowarmCount''' is the number of items that will be pre-populated.
  
  == documentCache ==
  
@@ -94, +103 @@

      -->
  }}}
  
- '''autowarmCount''' is the number of items that will be pre-populated. A new cache calls a '''regenerator''' to re-populate or pre-populate the last ''n'' objects from the old cache into the new cache." (A new cache is created by a new Index Searcher.)
+ A new cache calls a '''regenerator''' to re-populate or pre-populate the last ''n'' objects from the old cache into the new cache." (A new cache is created by a new Index Searcher.)
  
  You can specify a regenerator for any of the cache types here, but !SolrIndexSearcher itself specifies the regenerators that Solr uses internally.