What is a cache?
In the field of search, the so-called cache is to create a storage area for search engines on high-speed memory hardware devices, to store common user queries and their results, and to use certain management strategies to maintain data in the cache. When the search engine receives the user's query request again, first looks in the cache system, if can find in the cache, returns the search result directly, otherwise takes the normal search process to return the search result. Caching technology is used in all current search engines.
The benefits of using caching for search engines:
1, speed up user query response time.
2, effectively reduce the search engine back-office calculation, save system resources.
Search engine Normal searching process:
1, the search engine receives the user inquiry request
2, the search engine on the user query words (statements) for Word segmentation
3, calculate the weight of each query word, constitute a query vector VQ
4. Read the inverted table of corresponding words stored on disk into memory
5. Intersection of all query terms (intersection: A collection of all documents containing all query terms RS (Result Set))
6, Traverse RS, each document corresponding to the weight vector VR and VQ calculate cosine value, join priority queue sorting.
(about cosine similarity of http://www.ruanyifeng.com/blog/2013/03/cosine_similarity.html)
7, according to the relative degree from high to low return to the client
Caching (cache) mechanism for search engines