Lucene(Elasticsearch使用了lucene的打分機(jī)制)使用布爾模型來找到匹配的文檔科雳,并使用一個(gè)稱為實(shí)際評(píng)分函數(shù)的公式來計(jì)算相關(guān)性。 該公式從term頻率/逆文檔頻率和向量空間模型中借用概念摆寄,但增加了更多特征呛每,如協(xié)調(diào)因子揍愁、域長(zhǎng)度歸一化和term/query條件的boost。
Boolean Model
The Boolean model simply applies the AND, OR, and NOT conditions expressed in the query to find all the documents that match. A query for
布爾模型纸厉,通過在query中使用 AND OR NOT 等條件表達(dá)式,來查找匹配的文檔五嫂,一個(gè)queyrfull AND text AND search AND (elasticsearch OR lucene)
will include only documents that contain all of the terms full, text, and search, and either elasticsearch or lucene.
將包含