Using SOLR to build the--SOLR configuration of enterprise search platform Solrconfig.xml

Source: Internet
Author: User

Solrconfig.xml This configuration file can be found in the E:\Work\solr-4.2.0-src-idea\solr\example\solr\collection1\conf you downloaded the SOLR package to install the Extract directory, This configuration file content is a bit more, the main content is: the use of the Lib configuration, including the dependent jar and some of SOLR's plug-ins, component information configuration, index configuration and query configuration, the following details about the index configuration and query configuration.

1 Index Indexconfig

SOLR performance Factors to understand the performance tradeoffs associated with various changes. The following table summarizes the various factors that can control SOLR index processing:

Property

Describe

Usecompoundfile

Reduce the number of files in use by consolidating many of the Lucene internal files into a single file. This can help reduce the number of file handles that SOLR uses, at the expense of performance. The default value for false should be sufficient unless the application is running out of file handles.

Rambuffersizemb

When a document is added or deleted, SOLR caches the cache in memory in order to reduce the number of frequent indexes, and it is updated to the index library when the in-memory file is larger than the set value. A larger value can make indexing time faster but will sacrifice more memory. If two values are set at the same time, the index will be refreshed if one is satisfied.

Maxbuffereddocs

Mergefactor

Determines the frequency at which low-level Lucene segments are merged. Smaller values (minimum 2) use less memory but result in slower indexing times. A larger value can make indexing time faster but will sacrifice more memory.

Maxindexingthreads

IndexWriter maximum number of threads to use when building indexes

Unlockonstartup

Unlockonstartup tells SOLR to ignore the locking mechanism used to protect the index in a multithreaded environment. In some cases, an index may remain locked due to an incorrect shutdown or other error, which prevents additions and updates. Set it to true to disable startup locking, allowing for additions and updates.

LockType

Single: Used in a read-only index or when no other process modifies the index.

Native: Using an operating system local file lock, you cannot use multiple SOLR to share an index in the same JVM.

Simple: Use a text file to lock the index.

2 Querying configuration Query

Property

Describe

Maxbooleanclauses

Maximum number of booleanquery. Throws a toomanyclausesexception when the value is exceeded. Note that this is global, if more than one solrcore will use a values, each core is set differently, will use the last one.

Filtercache

Filtercache stores the unordered set of Lucene document IDs, 1. Stores the result of the document ID collection obtained by the filter queries ("FQ" parameter). 2 can also be used for facet queries 3.3) If Usefilterforsortedquery is configured, then Filtercache is used if the query has filter.

Queryresultcache

Cache search results, a list of document IDs

Documentcache

Cached Lucene Document object, not self-heating

Fieldvaluecache

The field cache uses the document ID for quick access. By default, Fieldvaluecache is created even if it is not configured here.

Enablelazyfieldloading

If the application expects only a few Field on the Document to be retrieved, you can set the property to True. A common scenario for lazy loading occurs when an application returns and displays a series of search results, and users often click one of them to view the original document stored in this index. The initial display often requires only a short piece of information to be displayed. If you consider the cost of retrieving a large document, you should avoid loading the entire document unless necessary.

Queryresultwindowsize

The maximum number of doc IDs stored in a single query.

Queryresultmaxdocscached

Query Results Doc's maximum number of caches, such as the requirement to display 10 per page, which is set to 20, that is, the cache will always give you more than 10 data. Get your data when you click on the next page.

Listener

Options define the Newsearcher and Firstsearcher events, which you can use to specify which queries should be executed when you instantiate a new search program or the first search program. If your application expects to request certain queries, you should uncomment those parts and execute the appropriate query when you create a new search program or the first search program.

Usecoldsearcher

Whether to use cold search, false when using self-heating after searcher

Maxwarmingsearchers

Maximum number of self-heating searcher

Using SOLR to build the--SOLR configuration of enterprise search platform Solrconfig.xml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.