<!-- Limit the number of deletions Solr will buffer during doc updating.
Setting this lower can help bound memory use during indexing.
-->
缓冲更新这么多的数目,设置如下比较低的值,可以约束索引时候所用的内存
<maxPendingDeletes>100000</maxPendingDeletes>
等待文档满足一定的标准后将自动提交,未来版本可以扩展现有的标准
<!-- autocommit pending docs if certain criteria are met. Future versions may expand the available
criteria -->
<autoCommit>
<maxDocs>10000</maxDocs> <!-- maximum uncommited docs before autocommit triggered -->
触发自动提交前最多可以等待提交的文档数量
<maxTime>86000</maxTime> <!-- maximum time (in MS) after adding a doc before an autocommit is triggered -->
在添加了一个文档之后,触发自动提交之前所最大的等待时间
</autoCommit>
<query>
<!-- Maximum number of clauses in a boolean query... can affect range
or wildcard queries that expand to big boolean queries.
一次布尔查询的最大数量,可以影响查询的范围或者进行通配符的查询,借此来扩展一个更强大的查询。
An exception is thrown if exceeded.
-->
<maxBooleanClauses>1024</maxBooleanClauses>
<query>:
控制跟查询相关的一切东东。
Caching:修改这个参数可以做为索引的增长和变化。
<!-- Cache used by SolrIndexSearcher for filters (DocSets),
unordered sets of *all* documents that match a query.
在过滤器中过滤文档集合的时候,或者是一个无序的所有的文档集合中将在在SolrIndexSearcher中使用缓存来匹配符合查询的所有文档。
When a new searcher is opened, its caches may be prepopulated
or "autowarmed" using data from caches in the old searcher.
当一次搜索被打开,它可以自动的或者预先从旧的搜索中使用缓存数据。
autowarmCount is the number of items to prepopulate.
autowarmCount这个值是预先设置的数值项。
For LRUCache,
the autowarmed items will be the most recently accessed items.
在LRUCache中,这个autowarmed 项中保存的是最近访问的项。
Parameters: 参数选项
class - the SolrCache implementation (currently only LRUCache)实现SolrCache接口的类 当前仅有LRUCache
size - the maximum number of entries in the cache
在cache中最大的上限值
initialSize - the initial capacity (number of entries) of
the cache. (seel java.util.HashMap)
在cache中初始化的数量
autowarmCount - the number of entries to prepopulate from
and old cache.
从旧的缓存中预先设置的项数。
-->
<filterCache
class="solr.LRUCache"
size="512"
initialSize="512"
/>
<!-- queryResultCache caches results of searches - ordered lists of
document ids (DocList) based on a query, a sort, and the range
of documents requested. -->
查询结果缓存
<queryResultCache
class="solr.LRUCache"
size="512"
initialSize="512"
/>
<!-- documentCache caches Lucene Document objects (the stored fields for each document).
documentCache缓存Lucene的文档对象(存储领域的每一个文件)
Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
由于Lucene的内部文档ID标识(文档名称)是短暂的,所以这种缓存不会被自动warmed。
<documentCache
class="solr.LRUCache"
size="512"
initialSize="512"
/>
<!-- Example of a generic cache.
一个通用缓存的列子。
These caches may be accessed by name
through SolrIndexSearcher.getCache().cacheLookup(), and cacheInsert().
这些缓存可以通过在SolrIndexSearcher.getCache().cacheLookup()和cacheInsert()中利用缓存名称访问得到。
The purpose is to enable easy caching of user/application level data.
这样做的目的就是很方便的缓存用户级或应用程序级的数据。
The regenerator argument should be specified as an implementation
of solr.search.CacheRegenerator if autowarming is desired. -->
这么做的的关键就是应该明确规定实现solr.search.CacheRegenerator接口如果autowarming是比较理想化的设置。
<!--
<cache name="myUserCache"
class="solr.LRUCache"
size="4096"
initialSize="1024"
<!-- An optimization that attempts to use a filter to satisfy a search.
一种优化方式就是利用一个过滤器,以满足搜索需求。
If the requested sort does not include a score,
如果请求的不是要求包括得分的类型,filterCache 这种过滤器将检查与过滤器相匹配的结果。如果找到,过滤器将被用来作为文档的来源识别码,并在这个基础上进行排序。
then the filterCache
will be checked for a filter matching the query. If found, the filter
will be used as the source of document ids, and then the sort will be
applied to that.
-->
<useFilterForSortedQuery>true</useFilterForSortedQuery>
<!-- An optimization for use with the queryResultCache. When a search
is requested, a superset of the requested number of document ids
are collected. For example, of a search for a particular query
requests matching documents 10 through 19, and queryWindowSize is 50,
then documents 0 through 50 will be collected and cached. Any further
requests in that range can be satisfied via the cache.
-->
<!-- This entry enables an int hash representation for filters (DocSets)
when the number of items in the set is less than maxSize. For smaller
sets, this representation is more memory efficient, more efficient to
iterate over, and faster to take intersections.
-->
<HashDocSet maxSize="3000" loadFactor="0.75"/>
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
cached filters if the number of docs selected by the clause exceeds the
threshold (represented as a fraction of the total index)
-->
<boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/>
<!-- Lazy field loading will attempt to read only parts of documents on disk that are
requested. Enabling should be faster if you aren't retrieving all stored fields.
-->
<enableLazyFieldLoading>false</enableLazyFieldLoading>