In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "what is the core mechanism of Solr1.3". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what is the core mechanism of Solr1.3"?
Kernel calling mechanism
You can see from figure 3-3 that the Solr1.3 server contains a core API, also known as the kernel, that implements basic functions. All functions are implemented by calling the kernel API. The interface provided by API, the kernel of Solr1.3, has the characteristics of high cohesion and low coupling. Low coupling is mainly reflected in the fact that the functions including information query and index management can be realized only through an API function (execute). The format of the execute function call is shown in figure 3-3.
Figure 3-3 Solr kernel API call format
Although the same API calls are used for information queries and index management (including index add, update, and delete), the API parameters are different. For the query request SolrRequestHandler, the Handler,SolrQueryRequest responsible for information query is the information query parameter, and the SolrQueryResponse is the search result. For index management, SolrRequestHandler is the Handler,SolrQueryRequest responsible for index management, and SolrQueryResponse is the result of index management operation.
The low-coupling structure of kernel API makes it simple and clear logic structure, and the diversity of parameter subtypes of execute method makes this method have powerful function.
Sub-library mechanism
Sub-library mechanism (also known as multi-core mechanism) is a new mechanism introduced in Solr1.3, which has a strong demand in practical applications. For example, users do not want the index data of ordinary documents (Word, PDF, etc.) to be mixed with the index data of web pages, and want to choose whether to query ordinary documents or web pages, so it is necessary to index sub-database.
Solr1.3 sub-library can be achieved like this: under the home directory to establish a folder (or more, on behalf of the library), this folder called config and data folder, config folder to store custom schema.xml files and solrconfig.xml files, data folder to store index data; in the home directory under the solr.xml to add the above established library, the specific format see section 3.3.2.
Each library of Solr1.3 corresponds to each core of the server, each core is independent of each other, and each core can have independent document schema and system properties.
Caching mechanism
The response speed of search engine is an important measure of search engine performance. Because the index data is saved on the hard disk, as a peripheral device, the access speed of the hard disk is relatively slow; at the same time, because the querier obtains the corresponding query results from the index database, it will take a certain amount of time and resources to carry out some calculations; so there is a certain bottleneck in the speed of query. There may be duplicate queries in multiple users' queries, which provides an opportunity for us to cache some query results so that the next time users query again, they can quickly get the query results from the cache.
Solr provides a powerful caching mechanism to improve performance. Tables 3-15 list the various caches provided by Solr.
Table 3-15 caching in Solr
FilterCache
The unordered set of document ID, which can be queried accurately within a certain document.
QueryResultCache
The ordered table of the document ID, the result document of a query sorted according to a certain policy
DocumentCache
An object that stores the Document obtained from disk
User Caches
Custom cach
Solr also provides a cache "warm" mechanism, that is, how to get the data in the cache when the cache is established, one of which is to copy from the existing cache.
At this point, I believe you have a deeper understanding of "what is the core mechanism of Solr1.3". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.