SOLR Application Guide

Source: Internet
Author: User
Tags solr solr query

For more information about how to improve SOLR performance, see SOLR's official guide: Release. The following is my little experience in SOLR applications.

 

1. About System Platform selection. I suggest deploying JRE and tomcat in Linux. We recommend that you use the latest version of JRE and tomcat. For Linux, please refer to some information on the Internet to optimize it. The Tomcat and JVM parameters are optimized based on the actual hardware and software. Tomcat uses NiO connector.

 

2. We recommend that you use the replication mode. Using the replication mode and read/write splitting ensures high performance for SOLR search queries and index creation. You can select Commit and optimize to trigger Replication Based on the replication conditions. If real-time requirements are not high, you can select optimize for replication. As a master, you must set maxwarmingsearchers Based on the index submission frequency.

3. we recommend that you use SOLR's javabin protocol to achieve better performance. in the. NET client, only easynet. SOLR (http://easynet.codeplex.com) support, easy to maintain and extend.

 

4. For index updates, when the raw data is relatively small, you can use a scheduled task to update tens of thousands of data records, including reading data, submitting indexes, and optimizing indexes, which will not exceed 5 minutes. Distributed indexing is supported for large data volumes. For high real-time requirements, you can process updates through the queue service.

 

5. I do not recommend that you modify the SOLR query parser easily. It is best to put it on the front-end for Processing Based on your needs and actual situations. For example, for the help center, you may have some requirements for query: You need to split the word and display titles that meet the conditions first. In this case, you can make a front-end unified service for processing, word Segmentation is generally performed for words entered by the user with the highest weight. Then, the query is re-constructed and the title is also weighted. In this way, the search is basically in line with the requirements.

 

6. We recommend that you enable HTTP cache for SOLR. I personally use 304, so that when the index does not change, I can directly read the data in the cache.

 

7. it is not recommended that SOLR be directly used for Internet services. I will create a unified retrieval service layer for service preprocessing and some comparative logic processing, such: authentication, service routing, Word Segmentation preprocessing, retrieval of call logs, and composite processing of returned data.

 

8. The schema definition must be standardized in the early stage. For example, I like to keep it consistent with the database field name as much as possible, so it is easy to find problems. For fields that need to be highlighted, Facet query, and foreground display, you must set stored to true, and indexed to true for retrieval. Do not set the field stored = true as much as possible. When the data volume is large, it still affects performance.

 

 

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.