Additional configuration related to SolrIndexSearcher in solr

The previous blogs have introduced the cache, warm, and listener of solrIndexSearcher. In fact, there are many other configurations. This blog is about these. Let me state first, my solr is 5.5.3.

The configuration under <query></query> in solrCOnfig.xml is related to SolrIndexSearcher, and the <listener> in the previous blog is in <query>. Let's take a look at those configurations in solrconfig.xml:

  <query>
	<listener event="newSearcher" class="com.comall.solr.listener.HelloWordListener"> This is the configured listener
		<arr name="sortFields">   <!-- arr是arraylist -->
			<str>title</str>  
			<str>id</str>  
		</arr>
		<!--str is a string -->
		<str name="queryKeyFile">/Users/yzygenuine/56workspace/solr_jetty/solr/extConf/query.txt</str>  
		
		<arr name="queries">  
			<lst> <!--lst is a NamedList org.apache.solr.common.util.NamedList-->
				<str name="q">solr</str>
				<str name="qt">standard</str>
				<str name="sort">price desc</str>
			</lst>  
		</arr>  
	</listener>  
     <!--The maximum number of clauses of booleanQuery, this is the modification in the entire jvm -->
    <maxBooleanClauses>1024</maxBooleanClauses>
    <!--The filterCache--> mentioned earlier
    <filterCache class="solr.FastLRUCache"  size="512"   initialSize="512"  autowarmCount="0"/>
     <!-- QueryResultCache--> as mentioned earlier
    <queryResultCache class="solr.LRUCache"size="512"    initialSize="512"  autowarmCount="0"/>
     <!--Said earlier-->
    <documentCache class="solr.LRUCache" size="512"      initialSize="512"  autowarmCount="0"/>
    
    <!-- User-defined cache, getCache(String) in SolrIndexSearcher is to look up from this cache, this can be configured multiple times, it can be found in the construction method of solrConfig, multiple configurations are encapsulated into one array -->
    <cache name="perSegFilter"  class="solr.search.LRUCache"  size="10"  initialSize="0"  autowarmCount="10" regenerator="solr.NoOpRegenerator" />

    <!-- For those docs that have not been cached in the DocumentCache, whether to lazily load or not, prefer true -->
    <enableLazyFieldLoading>true</enableLazyFieldLoading>

   <!-- This indicates the minimum number of queries: because the query results are cached, this indicates the minimum number of docs to be searched from the index, which is used in org.apache.solr.search.SolrIndexSearcher.getDocListC(QueryResult, QueryCommand) method -->
   <queryResultWindowSize>20</queryResultWindowSize>

   <!-- The maximum number of doc that can be cached for a queryKey in queryResultCache, if the number of requests for a query is too large, it will not be cached. This can be adjusted according to business needs, especially when querying by paging -->
   <queryResultMaxDocsCached>200</queryResultMaxDocsCached>

    <!-- Whether a SolrIndexSearcher without preheating is allowed to register as a searcher for service use is org.apache.solr.core.SolrCore.getSearcher(boolean, boolean, Future[], boolean),
         If there is currently no searcher for the service, if you can use a searcher without preheating, the searcher without preheating will be registered, if not, you must preheat -->
    <useColdSearcher>false</useColdSearcher>

    <!-- This value indicates the maximum number of searchers that are preheated in the background. If there are searchers that exceed this value, an error will be reported when committing again, that is, an error will be reported if multiple commits occur at the same time. Its use is in org.apache.solr.core.SolrCore.getSearcher(boolean, boolean, Future[], boolean).
         Recommend values of 1-2 for read-only slaves, higher for  masters w/o cache warming.
      -->
    <maxWarmingSearchers>2</maxWarmingSearchers>

  </query>

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326560749&siteId=291194637