1.算法介绍 relevance score(相关性分数) 算法,简单来说,就是计算出,一个索引中的文本,与搜索文本,他们之间的关联匹配程度.Elasticsearch使用的是 term frequency/inverse document frequency算法,简称为TF/IDF算法.TF词频(Term Frequency),IDF逆向文件频率(Inverse Document Frequency) 1.1 Term frequency 搜索文本中的各个词条在field文本中出现了多少次,出…
訪问者模式: 定义了一个作用于一个类的一些操作,訪问者模式同意在不改变类的前提下添加一些操作. Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates. UML类图: 主要包括: Vis…