12 solr

problem

What is the role of solr

answer

  • solr is a search and a search engine to lucence established based inverted index based on the index, complete documentation and content search, a typical space for time.
  • First explain the forward index, which is based ID document for keywords, table records the location information of each word in the document, information lookup table scan each word of the document until it finds all documents containing the query keywords.
“文档1”的ID > 单词1:出现次数,出现位置列表;单词2:出现次数,出现位置列表;单词n:出现次数,出现位置列表;
“文档2”的ID > 单词a:出现次数,出现位置列表;单词b:出现次数,出现位置列表;单词z:出现次数,出现位置列表;
  • Inverted list with positive displacement based index is a word or phrase as a keyword, the keyword table corresponding to the content recorded to the emergence of the word or words all documents, records the ID and the character of the document in the document location situations arise.
“关键词1”:“文档1”的ID,关键词1位置;“文档1”的ID,关键词1位置;“文档2”的ID,关键词1位置;
“关键词2”:“文档1”的ID,关键词2位置;“文档a”的ID,关键词2位置;“文档z”的ID,关键词2位置;
  • Word, solr word that comes will press Chinese word for word to be divided, for example, "Nanjing, Jiangsu Wan and very good" will be divided into "South", "Beijing", "of", "river" "Su", "Wan", "and", "pretty", "no", "wrong", "the";
    whether the usual semantics to divide, it is necessary to use a IK_analyzer. Thus, the above sentence will be classified as "Nanjing", "of", "Jiangsu", "Wan and", "very good", "the";
    Can "Jiangsu Million and" classified as a word of it, you need to use the extended thesaurus;
    can "and", "very good" as a keyword does not, you need to stop using the thesaurus;
    can "Nanjing" Jinling can be found out with it, you need to use synonyms.

Guess you like

Origin www.cnblogs.com/alichengxuyuan/p/12601893.html