In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you a sample analysis of solrconfig.xml configuration, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The solrconfig.xml configuration file mainly defines some processing rules of SOLR, including the storage location of index data, update, deletion, query and some rule configuration.
You can find this file C:\ Program Files\ Apache Software Foundation\ Tomcat 8.0\ solr\ collection1\ conf under the installation path of tomcat
1.datadir node
1. ${solr.data.dir:d:/Server/Solr/data} defines the location of index data and log files.
2.luceneMatchVersion
4.8
Indicates that lucene4.8 is used at the bottom of solr.
3. Lib
Indicates the location of the solr reference package. This attribute is ignored when the directory corresponding to dir does not exist.
4.directoryFactory
Index storage scheme, which has the following storage scheme
1. Solr.StandardDirectoryFactory, which is a factory based on file system storage directories, will try to choose the best implementation based on your current operating system and Java virtual machine version.
2. Solr.SimpleFSDirectoryFactory, which is suitable for small applications and does not support big data and multithreading.
3. Solr.NIOFSDirectoryFactory, which is suitable for multithreaded environment, but not for windows platform (very slow) because bug still exists in JVM.
4. Solr.MMapDirectoryFactory, which is the default implementation of solr3.1 to 4.0 under the linux64 bit system. It is called by using virtual memory and kernel features
Mmap goes to access the index file stored on disk. It allows lucene or solr direct access to the Igamot O cache. If you do not need near-real-time search function, using this factory is a good solution.
5. Solr.NRTCachingDirectoryFactory, this factory is designed to store some indexes in memory, thus speeding up the speed of near real-time search.
6. Solr.RAMDirectoryFactory, which is a memory storage scheme, cannot be persisted, and data will be lost when the system is restarted or the server crash. And index replication is not supported
${solr.hdfs.home:} ${solr.hdfs.confdir:} ${solr.hdfs.blockcache.enabled:true} ${solr.hdfs.blockcache.global:true}
5. CodecFactory
The codec factory allows the use of custom codecs. For example, if you want to start per-field DocValues format, you can set SchemaCodecFactory in solrconfig.xml:
DocValuesFormat= "Lucene42": this is the default setting, and all data is loaded into heap memory.
DocValuesFormat= "Disk": this is another implementation that stores some of the data on disk.
DocValuesFormat= "SimpleText": text format, very slow, for learning.
6.indexconfig node
Low-level properties used to set the index
1. / / limit the maximum length of token
2. The maximum time (milliseconds) that 1000//IndexWriter waits to be unlocked.
3 、 8//
4. False// Solr defaults to false. If true, index files are reduced, retrieval performance is degraded, and balance is pursued.
5. 100max / cache
6. 1000RMB / ditto. When two are defined at the same time, hit the lower one.
7 、
ten
ten
/ / merger strategy.
8, 10 segments / merging factor, how many CPUs are merged each time.
9. / / merge the scheduler.
10. ${solr.lock.type:native} / / Lock factory.
11. Whether false// is unlocked when it starts.
12. 128//Lucene loads terms into memory interval
13. True// is reopened, instead of closing-and-opening first.
14. / / submit deletion policy. Org.apache.lucene.index.IndexDeletionPolicy must be implemented.
15 、 1
16 、 0
17 、 30MINUTES OR 1DAY
18. False// is equivalent to the output of the log when the index is created.
${solr.lock.type:native}
There are three main ways to set the lock of the index database:
1.single: suitable for read-only index libraries, that is, index libraries are dead and will not be changed
2.native: use the file locking method of the local operating system, which cannot be used for multiple solr services to share the same index library. The default locking mechanism used by Solr3.6 and later versions.
3.simple: using a simple file locking mechanism
7. UpdateHandler node
Define the update processor
${solr.ulog.dir:}
Set the index library update log, and the default path is data/tlog under solr home. With the frequent updates of the index library, the tlog file will become larger and larger.
Therefore, it is recommended to use hard submission method when submitting the index, that is, batch submission.
15000 10000 false
Automatic hard submission method: maxTime: set how often to submit maxDocs: set how often a document is submitted openSearcher: whether to open a new searcher after a document is submitted
If false, the document is only submitted to the index index database, and the submitted document cannot be found in the search results; if true, not only the submitted document is submitted to the index index library, but also the submitted content can be found in the search results.
${solr.ulog.dir:} 15000 false exe-- executable file types dir-- can use this directory as the current working directory. The default is "." The wait-- calling thread waits for the executable return value args-- to pass to the program parameter default nothing env-- environment variable setting default nothing
8.Query query node
1024
Sets the maximum number of conditions in the boolean query. In range search or prefix search, a large number of boolean conditions are generated.
If the number of conditions reaches this value, an exception will be thrown to limit the number of conditions, which can prevent the query waiting time from being too long.
Cache method http://www.cnblogs.com/phinecos/archive/2012/05/24/2517018.html
2002
9.Request Dispatcher
Request transponder
10.requestHandler
Request processor
Explicit 10 text and above are all the contents of the article "sample Analysis of solrconfig.xml configuration". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.