`
damoqingquan
  • 浏览: 48399 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

solr的配置参数理解

阅读更多

l  dataDir参数

用于替换默认的索引数据目录(./data)。如果重复指定,将使用重复的值。如果不是绝对路径,将使用servlet容器当前工作目录下的相对路径。

<dataDir>/var/data/solr</dataDir>

 

l  mainIndex参数部分

mainIndex>
    <!-- lucene options specific to the main on-disk lucene index -->
    <useCompoundFile>false</useCompoundFile>
    <mergeFactor>10</mergeFactor>
    <maxBufferedDocs>1000</maxBufferedDocs>
    <maxMergeDocs>2147483647</maxMergeDocs>
    <maxFieldLength>10000</maxFieldLength>
  </mainIndex>

 

mergeFactor指定同样大小的segment达到多少时会被合并。如果你设置改值为10,那么每当1000maxBufferedDocs)个doc被添加到索引时(它们可能在内存中),一个新的sgement将在硬盘上创建,当第10个同样大小的segment被创建后,这10segement 将被合并成一个包含1000010*1000)个docsegment。同样当第10个包含10000docsegment被创建的时候,他们将合并成更大的segment。当然这种合并并不是无休止的。这是因为下面的参数对其进行了限制。

maxMergeDocs】每个segment所能容纳的doc数目上限。

maxFieldLength】指定每个field的最大长度。

l  Update Handler 参数部分

这部分通常是关于内部如如何处理update低级配置信息(不要与处理客户端发送的updateRequest Handler高级配置信息相混淆)。

<updateHandler class="solr.DirectUpdateHandler2">
 
    <!-- 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>
 

l  与更新相关的事件监听器("Update" Related Event Listeners

为与特殊更新相关的事件("postCommit" "postOptimize".)指定监听器。监听器能触发任意的特殊代码,它们的典型应用是快照功能。

    ...
 
    <!-- The RunExecutableListener executes an external command.
         exe  - the name of the executable to run
         dir  -  dir to use as the current working directory. default="."
         wait - the calling thread waits until the executable returns. 
                default="true"
         args - the arguments to pass to the program.  default=nothing
         env  - environment variables to set.  default=nothing
      -->
    <!-- A postCommit event is fired after every commit
      -->
    <listener event="postCommit" class="solr.RunExecutableListener">
      <str name="exe">snapshooter</str>
      <str name="dir">solr/bin</str>
      <bool name="wait">true</bool>
      <!--
      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
      <arr name="env"> <str>MYVAR=val1</str> </arr>
        -->
    </listener>
  </updateHandler>

l  查询参数部分(The Query Section

控制与查询相关的一切。

<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>

l  缓存参数部分(Caching Section

当你的索引量增加或变化的时候,你需要在这里进行配置。关于缓存配置的更多细节请点这里

<!-- Cache used by SolrIndexSearcher for filters (DocSets),
         unordered sets of *all* documents that match a query.
         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.  For LRUCache,
         the autowarmed items will be the most recently accessed items.
       Parameters:
         class - the SolrCache implementation (currently only LRUCache)
         size - the maximum number of entries in the cache
         initialSize - the initial capacity (number of entries) of
           the cache.  (seel java.util.HashMap)
         autowarmCount - the number of entries to prepopulate from
           and old cache.
         -->
    <filterCache
      class="solr.LRUCache"
      size="512"
      initialSize="512"
      autowarmCount="256"/>
 
   <!-- 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"
      autowarmCount="256"/>
 
  <!-- documentCache caches Lucene Document objects (the stored fields for each document).
       Since Lucene internal document ids are transient, this cache will not be autowarmed.  -->
    <documentCache
      class="solr.LRUCache"
      size="512"
      initialSize="512"
      autowarmCount="0"/>
 
    <!-- Example of a generic cache.  These caches may be accessed by name
         through SolrIndexSearcher.getCache().cacheLookup(), and 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.  -->
    <!--
    <cache name="myUserCache"
      class="solr.LRUCache"
      size="4096"
      initialSize="1024"
      autowarmCount="1024"
      regenerator="org.mycompany.mypackage.MyRegenerator"
      />
    -->
 
    <!-- An optimization that attempts to use a filter to satisfy a search.
         If the requested sort does not include a score, 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.
    -->
    <queryResultWindowSize>50</queryResultWindowSize>
 
    <!-- 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>

l  查询相关的事件监听器参数配置("Query" Related Event Listeners

在这里定义与特殊查询相关的事件监听器,使用该监听器实现需要的代码,例如启动常用的查询去预热缓存。

newSearcher 在有注册搜索器存在的时启动一个新的搜索器,下例中的监听器就是这类,它获得查询列表并将它们发送到新的搜索器以达到预热的目的。

<!-- a newSearcher event is fired whenever a new searcher is being
         prepared and there is a current searcher handling requests 
         (aka registered). 
     -->
    <!-- QuerySenderListener takes an array of NamedList and 
         executes a local query request for each NamedList in sequence.
     -->
    <!--
    <listener event="newSearcher" class="solr.QuerySenderListener">
      <arr name="queries">
        <lst> <str name="q">solr</str> 
              <str name="start">0</str>
              <str name="rows">10</str> 
        </lst>
        <lst> <str name="q">rocks</str> 
              <str name="start">0</str>
              <str name="rows">10</str> 
        </lst>
      </arr>
    -->

firstSearcher

当不存在已注册的搜索器时启动新的firstSearcher。下例正式如此,该监听器获得查询列表将其发送到正启动的新的搜索器,将其预热。(注意,只有当存在已注册搜索器的时候才可以使用自动预热auto-warming

<!-- a firstSearcher event is fired whenever a new searcher is being
         prepared but there is no current registered searcher to handle 
         requests or to gain prewarming data from.
     -->
    <!--
    <listener event="firstSearcher" class="solr.QuerySenderListener">
      <arr name="queries">
        <lst> <str name="q">fast_warm</str> 
              <str name="start">0</str>
              <str name="rows">10</str>
        </lst>
      </arr>
    </listener>
分享到:
评论
1 楼 JLK 2009-02-02  
<div class="quote_title">damoqingquan 写道</div>
<div class="quote_div">
<p class="MsoListParagraph" style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt;"><span style="font-family: Wingdings;"><span><span style="font-size: small;">l</span><span>  </span></span></span><span style="font-size: small;"><strong><span lang="EN-US">dataDir</span></strong><strong><span>参数</span></strong><strong></strong></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>用于替换默认的索引数据目录(</span><span lang="EN-US">./data</span><span>)。如果重复指定,将使用重复的值。如果不是绝对路径,将使用</span><span lang="EN-US">servlet</span><span>容器当前</span><span>工作目录下的相对路径。</span></span></p>
<div style="background: #f3f5f7; border: #aebdcc 1pt solid; padding: 5pt;">
<p class="MsoNormal" align="left" style="text-align: left; line-height: 15pt; margin: 0cm 0cm 0pt; background: #f3f5f7; padding: 0cm;"><span lang="EN-US">&lt;dataDir&gt;/var/data/solr&lt;/dataDir&gt;</span></p>
</div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><strong><span lang="EN-US"><span style="font-size: small;"> </span></span></strong></p>
<p class="MsoListParagraph" style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt;"><span style="font-family: Wingdings;"><span><span style="font-size: small;">l</span><span>  </span></span></span><span style="font-size: small;"><strong><span lang="EN-US">mainIndex</span></strong><strong><span>参数部分</span></strong><strong></strong></span></p>
<div style="background: #f3f5f7; border: #aebdcc 1pt solid; padding: 5pt;">
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;">mainIndex&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- lucene options specific to the main on-disk lucene index --&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;useCompoundFile&gt;false&lt;/useCompoundFile&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;mergeFactor&gt;10&lt;/mergeFactor&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;maxBufferedDocs&gt;1000&lt;/maxBufferedDocs&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;maxMergeDocs&gt;2147483647&lt;/maxMergeDocs&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;maxFieldLength&gt;10000&lt;/maxFieldLength&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>  </span>&lt;/mainIndex&gt;</span></span></pre>
</div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span lang="EN-US"><span style="font-size: small;"> </span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>【</span><span lang="EN-US">mergeFactor</span><span>】</span><span>指定同样大小的</span><span lang="EN-US">segment</span><span>达到多少时会被合并。如果你设置改值为</span><span lang="EN-US">10</span><span>,那么每当</span><span lang="EN-US">1000</span><span>(</span><span lang="EN-US">maxBufferedDocs</span><span>)个</span><span lang="EN-US">doc</span><span>被添加到索引时(它们可能在内存中),一个新的</span><span lang="EN-US">sgement</span><span>将在硬盘上创建,当第</span><span lang="EN-US">10</span><span>个同样大小的</span><span lang="EN-US">segment</span><span>被创建后,这</span><span lang="EN-US">10</span><span>个</span><span lang="EN-US">segement </span><span>将被合并成一个包含</span><span lang="EN-US">10000</span><span>(</span><span lang="EN-US">10*1000</span><span>)个</span><span lang="EN-US">doc</span><span>的</span><span lang="EN-US">segment</span><span>。同样当第</span><span lang="EN-US">10</span><span>个包含</span><span lang="EN-US">10000</span><span>个</span><span lang="EN-US">doc</span><span>的</span><span lang="EN-US">segment</span><span>被创建的时候,他们将合并成更大的</span><span lang="EN-US">segment</span><span>。当然这种合并并不是无休止的。这是因为下面的参数对其进行了限制。</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>【</span><span lang="EN-US">maxMergeDocs</span><span>】每个</span><span lang="EN-US">segment</span><span>所能容纳的</span><span lang="EN-US">doc</span><span>数目上限。</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>【</span><span lang="EN-US">maxFieldLength</span><span>】指定每个</span><span lang="EN-US">field</span><span>的最大长度。</span></span></p>
<p class="MsoListParagraph" style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt;"><span style="font-family: Wingdings;"><span><span style="font-size: small;">l</span><span>  </span></span></span><span style="font-size: small;"><strong><span lang="EN-US">Update Handler </span></strong><strong><span>参数部分</span></strong><strong></strong></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>这部分通常是关于内部如如何处理</span><span lang="EN-US">update</span><span>低级配置信息(不要与处理客户端发送的</span><span lang="EN-US">update</span><span>的</span><span lang="EN-US">Request Handler</span><span>高级配置信息相混淆)。</span></span></p>
<div style="background: #f3f5f7; border: #aebdcc 1pt solid; padding: 5pt;">
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;">&lt;updateHandler class="solr.DirectUpdateHandler2"&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- Limit the number of deletions Solr will buffer during doc updating.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span></span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span>Setting this lower can help bound memory use during indexing.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;maxPendingDeletes&gt;100000&lt;/maxPendingDeletes&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- autocommit pending docs if certain criteria are met.<span>  </span>Future versions may expand the available</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>     </span>criteria --&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;autoCommit&gt;<span>  </span></span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;maxDocs&gt;10000&lt;/maxDocs&gt; &lt;!-- maximum uncommited docs before autocommit triggered --&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;maxTime&gt;86000&lt;/maxTime&gt; &lt;!-- maximum time (in MS) after adding a doc before an autocommit is triggered --&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;/autoCommit&gt;</span></span></pre>
<pre><span style="color: black;"><span style="font-family: Courier; font-size: small;"> </span></span></pre>
</div>
<p class="MsoListParagraph" style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt;"><span style="font-family: Wingdings;"><span><span style="font-size: small;">l</span><span>  </span></span></span><span style="font-size: small;"><strong><span>与更新相关的事件监听器(</span></strong><strong><span lang="EN-US">"Update" Related Event Listeners</span></strong><strong><span>)</span></strong><strong></strong></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>为与特殊更新相关的事件(</span><span lang="EN-US">"postCommit" </span><span>和</span><span lang="EN-US"> "postOptimize".</span><span>)指定监听器。监听器能触发任意的特殊代码,它们的典型应用是快照功能。</span></span></p>
<div style="background: #f3f5f7; border: #aebdcc 1pt solid; padding: 5pt;">
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>...</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- The RunExecutableListener executes an external command.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>exe<span>  </span>- the name of the executable to run</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>dir<span>  </span>-<span>  </span>dir to use as the current working directory. default="."</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>wait - the calling thread waits until the executable returns. </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>                </span>default="true"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>args - the arguments to pass to the program.<span>  </span>default=nothing</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>env<span>  </span>- environment variables to set.<span>  </span>default=nothing</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- A postCommit event is fired after every commit</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;listener event="postCommit" class="solr.RunExecutableListener"&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;str name="exe"&gt;snapshooter&lt;/str&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;str name="dir"&gt;solr/bin&lt;/str&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;bool name="wait"&gt;true&lt;/bool&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;!--</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;arr name="args"&gt; &lt;str&gt;arg1&lt;/str&gt; &lt;str&gt;arg2&lt;/str&gt; &lt;/arr&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;arr name="env"&gt; &lt;str&gt;MYVAR=val1&lt;/str&gt; &lt;/arr&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;/listener&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>  </span>&lt;/updateHandler&gt;</span></span></pre>
</div>
<p class="MsoListParagraph" style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt;"><span style="font-family: Wingdings;"><span><span style="font-size: small;">l</span><span>  </span></span></span><span style="font-size: small;"><strong><span>查询参数部分(</span></strong><strong><span lang="EN-US">The Query Section</span></strong><strong><span>)</span></strong><strong></strong></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>控制与查询相关的一切。</span></span></p>
<div style="background: #f3f5f7; border: #aebdcc 1pt solid; padding: 5pt;">
<pre><span style="font-size: 10.5pt; color: black;"><span style="font-family: Courier;">&lt;query&gt;</span></span></pre>
<pre><span style="font-size: 10.5pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- Maximum number of clauses in a boolean query... can affect range </span></span></pre>
<pre><span style="font-size: 10.5pt; color: black;"><span style="font-family: Courier;"><span>         </span>or wildcard queries that expand to big boolean queries.<span>  </span></span></span></pre>
<pre><span style="font-size: 10.5pt; color: black;"><span style="font-family: Courier;"><span>         </span>An exception is thrown if exceeded.</span></span></pre>
<pre><span style="font-size: 10.5pt; color: black;"><span style="font-family: Courier;"><span>    </span>--&gt;</span></span></pre>
<pre><span style="font-size: 10.5pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;maxBooleanClauses&gt;1024&lt;/maxBooleanClauses&gt;</span></span></pre>
</div>
<p class="MsoListParagraph" style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt;"><span style="font-family: Wingdings;"><span><span style="font-size: small;">l</span><span>  </span></span></span><span style="font-size: small;"><strong><span>缓存参数部分(</span></strong><strong><span lang="EN-US">Caching Section</span></strong><strong><span>)</span></strong><strong></strong></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>当你的索引量增加或变化的时候,你需要在这里进行配置。关于缓存配置的更多细节请点</span><span lang="EN-US"><a href="http://wiki.apache.org/solr/SolrCaching"><span lang="EN-US"><span lang="EN-US">这里</span></span></a></span><span>。</span></span></p>
<div style="background: #f3f5f7; border: #aebdcc 1pt solid; padding: 5pt;">
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;">&lt;!-- Cache used by SolrIndexSearcher for filters (DocSets),</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>unordered sets of *all* documents that match a query.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>When a new searcher is opened, its caches may be prepopulated</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>or "autowarmed" using data from caches in the old searcher.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>autowarmCount is the number of items to prepopulate.<span>  </span>For LRUCache,</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>the autowarmed items will be the most recently accessed items.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>       </span>Parameters:</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>class - the SolrCache implementation (currently only LRUCache)</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>size - the maximum number of entries in the cache</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>initialSize - the initial capacity (number of entries) of</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>           </span>the cache.<span>  </span>(seel java.util.HashMap)</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>autowarmCount - the number of entries to prepopulate from</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>           </span>and old cache.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>   </span><span> </span>&lt;filterCache</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>class="solr.LRUCache"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>size="512"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>initialSize="512"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>autowarmCount="256"/&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>   </span>&lt;!-- queryResultCache caches results of searches - ordered lists of</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>document ids (DocList) based on a query, a sort, and the range</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>of documents requested.<span>  </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;queryResultCache</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>class="solr.LRUCache"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>size="512"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>initialSize="512"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>autowarmCount="256"/&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>  </span>&lt;!-- documentCache caches Lucene Document objects (the stored fields for each document).</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>       </span>Since Lucene internal document ids are transient, this cache will not be autowarmed.<span>  </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;documentCache</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>class="solr.LRUCache"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>size="512"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>initialSize="512"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>autowarmCount="0"/&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- Example of a generic cache.<span>  </span>These caches may be accessed by name</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>through SolrIndexSearcher.getCache().cacheLookup(), and cacheInsert().</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>The purpose is to enable easy caching of user/application level data.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>The regenerator argument should be specified as an implementation</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>of solr.search.CacheRegenerator if autowarming is desired.<span>  </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!--</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;cache name="myUserCache"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>class="solr.LRUCache"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>size="4096"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>initialSize="1024"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>autowarmCount="1024"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>regenerator="org.mycompany.mypackage.MyRegenerator"</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>/&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- An optimization that attempts to use a filter to satisfy a search.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>If the requested sort does not include a score, then the filterCache </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>will be checked for a filter matching the query.<span>  </span>If found, the filter </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>will be used as the source of document ids, and then the sort will be </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>applied to that.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;useFilterForSortedQuery&gt;true&lt;/useFilterForSortedQuery&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- An optimization for use with the queryResultCache.<span>  </span>When a search</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>is requested, a superset of the requested number of document ids</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>are collected.<span>  </span>For example, of a search for a particular query</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>requests matching documents 10 through 19, and queryWindowSize is 50, </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>then documents 0 through 50 will be collected and cached. Any further </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>requests in that range can be satisfied via the cache.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;queryResultWindowSize&gt;50&lt;/queryResultWindowSize&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> <span>   </span>&lt;!-- This entry enables an int hash representation for filters (DocSets) </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>when the number of items in the set is less than maxSize. For smaller </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>sets, this representation is more memory efficient, more efficient to </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>iterate over, and faster to take intersections.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>     </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;HashDocSet maxSize="3000" loadFactor="0.75"/&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- boolToFilterOptimizer converts boolean clauses with zero boost</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>cached filters if the number of docs selected by the clause exceeds the</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>threshold (represented as a fraction of the total index)</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"> </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- Lazy field loading will attempt to read only parts of documents on disk that are </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>requested.<span>  </span>Enabling should be faster if you aren't retrieving all stored fields.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;enableLazyFieldLoading&gt;false&lt;/enableLazyFieldLoading&gt;</span></span></pre>
</div>
<p class="MsoListParagraph" style="text-indent: -21pt; margin: 0cm 0cm 0pt 21pt;"><span style="font-family: Wingdings;"><span><span style="font-size: small;">l</span><span>  </span></span></span><span style="font-size: small;"><strong><span>查询相关的事件监听器参数配置(</span></strong><strong><span lang="EN-US">"Query" Related Event Listeners</span></strong><strong><span>)</span></strong><strong></strong></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>在这里定义与特殊查询相关的事件监听器,使用该监听器实现需要的代码,例如启动常用的查询去预热缓存。</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>【</span><span lang="EN-US">newSearcher</span><span>】</span><span> </span><span>在有注册搜索器存在的时启动一个新的搜索器,下例中的监听器就是这类,它获得查询列表并将它们发送到新的搜索器以达到预热的目的。</span></span></p>
<div style="background: #f3f5f7; border: #aebdcc 1pt solid; padding: 5pt;">
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;">&lt;!-- a newSearcher event is fired whenever a new searcher is being</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>prepared and there is a current searcher handling requests </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>(aka registered). </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>     </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!-- QuerySenderListener takes an array of NamedList and </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>executes a local query request for each NamedList in sequence.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>     </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!--</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;listener event="newSearcher" class="solr.QuerySenderListener"&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;arr name="queries"&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span>&lt;lst&gt; &lt;str name="q"&gt;solr&lt;/str&gt; </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>              </span>&lt;str name="start"&gt;0&lt;/str&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>              </span>&lt;str name="rows"&gt;10&lt;/str&gt; </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span>&lt;/lst&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span>&lt;lst&gt; &lt;str name="q"&gt;rocks&lt;/str&gt; </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>              </span>&lt;str name="start"&gt;0&lt;/str&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>              </span>&lt;str name="rows"&gt;10&lt;/str&gt; </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span>&lt;/lst&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;/arr&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>--&gt;</span></span></pre>
</div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>【</span><span lang="EN-US">firstSearcher</span><span>】</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: small;"><span>当不存在已注册的搜索器时启动新的</span><span lang="EN-US">firstSearcher</span><span>。下例正式如此,该监听器获得查询列表将其发送到正启动的新的搜索器,将其预热。(注意,只有当存在已注册搜索器的时候才可以使用自动预热</span><span lang="EN-US">auto-warming</span><span>)</span></span></p>
<div style="background: #f3f5f7; border: #aebdcc 1pt solid; padding: 5pt;">
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;">&lt;!-- a firstSearcher event is fired whenever a new searcher is being</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>prepared but there is no current registered searcher to handle </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>         </span>requests or to gain prewarming data from.</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>     </span>--&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;!--</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;listener event="firstSearcher" class="solr.QuerySenderListener"&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;arr name="queries"&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span>&lt;lst&gt; &lt;str name="q"&gt;fast_warm&lt;/str&gt; </span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>              </span>&lt;str name="start"&gt;0&lt;/str&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>              </span>&lt;str name="rows"&gt;10&lt;/str&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>        </span>&lt;/lst&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>      </span>&lt;/arr&gt;</span></span></pre>
<pre><span style="font-size: 9pt; color: black;"><span style="font-family: Courier;"><span>    </span>&lt;/listener&gt;</span></span></pre>
</div>
</div>
<p> </p>

相关推荐

    solr6配置mmseg4j

    在Solr6中配置mmseg4j是为了实现中文分词,从而提升搜索效果。mmseg4j是基于Java的一个高性能中文分词库,它提供了多种分词算法,如最长匹配、最短路径等,以满足不同的分词需求。 首先,我们需要理解Solr6的基本...

    solr5配置中文分词

    本篇文章将深入探讨在Solr5中配置中文分词的过程。 首先,我们要了解的是分词器(Analyzer)。在Solr中,Analyzer是处理文本输入的组件,它负责将输入的文本转换为可搜索的术语。对于中文,我们需要一个能理解并...

    solr连接数据库配置

    首先,我们需要理解Solr的数据导入处理器(DataImportHandler,DIH)。DIH是Solr的一个模块,它可以定期从外部数据源(如关系型数据库)中抓取数据并将其索引到Solr。这个过程通常分为四个主要步骤: Full Import、...

    Solr的配置

    4. **设置启动参数**:在`catalina.bat`文件中添加配置参数`JAVA_OPTS=-Dsolr.solr.home=&lt;Solr目录路径&gt;`,其中`&lt;Solr目录路径&gt;`是Solr文件夹的实际路径。 5. **启动Tomcat**:完成以上步骤后,启动Tomcat即完成了...

    图解Solr5.3.1与MySQL配置【原创】

    1. **Solr样例文件**:在下载的Solr包的`example`目录中,可以找到许多样例配置文件,这些文件可以帮助开发者更好地理解Solr的各种配置选项。 2. **通过Solr控制台创建核**:除了手动创建核外,还可以通过Solr的管理...

    Solr3.5整合Tomcat

    Solr 是一个基于 Lucene 的全文搜索引擎服务器,它提供了高级的搜索功能,广泛应用于网站的全文检索、数据索引和搜索。...通过理解 Solr 的配置和 Tomcat 的部署机制,你可以更好地定制和扩展你的搜索解决方案。

    solr cache部分 中文解释

    求中多次命中的缓存。由于它避免了锁竞争,FastLRUCache 可能...通过理解各种缓存类型、替换策略及其工作原理,我们可以更好地优化 Solr 配置,以满足特定应用场景的需求,提高搜索服务的响应速度和系统资源利用率。

    Solr安装与配置solr.rar

    本压缩包“Solr安装与配置solr.rar”包含了Solr的安装和配置步骤,对于理解和使用Solr进行全文检索、索引和查询操作具有重要的参考价值。 首先,我们需要了解Solr的基本架构。Solr的核心组件包括索引库、请求处理器...

    solr4.9开发所需jar包

    10. **性能优化**:掌握如何调整Solr的配置参数,如缓存大小、索引策略等,以适应不同的工作负载。 总之,Solr4.9开发涉及多个方面,从基本的索引构建到复杂的分布式搜索和数据处理,都需要开发者有扎实的技术基础...

    solr增量更新架包apache-solr-dataimportscheduler.jar

    首先,我们要理解Solr的数据导入过程。Solr使用DataImportHandler(DIH)来从关系型数据库、XML文件或其他数据源导入数据。DIH提供了一个全面的数据加载框架,支持全量导入和增量导入。 1. **全量导入**:全量导入...

    ambari离线安装solr所需文件

    6. **配置Solr**:在Ambari的Web界面中,配置Solr的各个参数,例如数据目录、端口、索引设置等。 7. **安装Solr**:在Ambari的管理界面中,选择离线安装模式,然后添加并启动Solr服务。Ambari会根据你的配置和定义...

    solr搭建相关资源

    5. 分词器配置:根据业务需求,将本压缩包中的分词器JAR包添加到Solr的lib目录,然后在Solr配置文件中指定使用的分词器。 6. 启动Solr服务:启动Solr后,你可以通过浏览器访问`http://localhost:8983/solr/`(默认...

    solr-4.10.3.rar

    3. **配置与部署**:Solr的配置文件位于`conf`目录下,包括schema.xml(定义字段和字段类型)、solrconfig.xml(配置索引和查询参数)等。用户可以根据需求自定义这些配置。部署Solr通常涉及解压下载的`solr-4.10.3....

    solr5.5.4项目示例

    10. **性能优化**:Solr允许配置各种参数以优化查询性能,如缓存策略、内存分配等。本示例可能包含了这些优化的实例。 总的来说,"solr5.5.4项目示例"是一个综合性的教程,涵盖了Solr的基本操作,对于初学者来说是...

    solr ik分词器

    本教程将详细解释如何在Solr中安装和使用IK分词器。 首先,让我们理解一下什么是分词器。在文本检索和自然语言处理领域,分词是将连续的文本分解成有意义的词语单元(如单词或短语)的过程。对于中文,由于没有明显...

    solr深入浅出

    Solr的源码结构清晰,包括目录结构、Solr Home配置等,便于理解和开发扩展。 在部署和配置上,Solr可以与Tomcat等应用服务器集成。安装过程中需注意版本选择,以及验证安装是否成功。对于中文分词,Solr支持mmseg4j...

    solr7.5官方文档

    文档中详细介绍了 Solr 的分面功能,包括如何配置分面参数、如何解析分面结果等。 #### 高亮显示 文档中解释了如何在 Solr 中启用高亮显示功能,使搜索结果中的关键词突出显示。 #### 拼写检查 文档中介绍了 ...

    solr资料

    ### Solr基础知识与实践操作详解 #### 一、Solr简介及安装配置 **Solr** 是一个基于 **Lucene** 的开源全文检索服务器。...随着进一步的学习,您将能深入理解Solr的强大功能及其在企业级搜索系统中的应用。

    SOLR简要配置

    【Solr简要配置】 Solr,全称为Apache Solr,是一个基于Apache Lucene的开源搜索服务器。它提供了高效、可扩展的企业级搜索...通过不断的实践和学习,可以深入理解Solr的特性和优势,更好地满足各种搜索场景的需求。

    solr search

    4. Core:Core是Solr中的独立工作单元,每个Core包含自己的配置和数据,可以理解为一个独立的搜索引擎实例。 二、Solr的关键特性 1. 全文检索:Solr支持对文本进行分词,并建立倒排索引,实现快速的全文搜索。 2. ...

Global site tag (gtag.js) - Google Analytics