Endeca Relevance Ranking(相關度排序)

Endeca Relevance Ranking(相關度排序)

Relevance Ranking Module 詳解

Exact:(精確匹配)

將整個結果進行一個分層,最高的層次,即最先呈現給用戶的層次,是完全精確匹配term的,第二層是將term 拆分後匹配的層次,第三層就是其他命中的層次。

舉個例子,比如現在sku.displayName這個property 有Nike Shoes, Nike XM Shoes,Nike-Shoes,"Nike Shoes"等,那麼最高層會將Nike Shoes放在第一層,然後包含Nike 或者 Shoes放在第二個層次,然後其他的比如Nike-Shoes,"Nike Shoes"放在第三層。

 

Filed:(字段匹配)

根據search interface 裏的字段在整個成員列表list的優先級別來設定的,排在最前面的優先級最高。

1 會對每一個結果打分

2 打分的依據是search interface 裏的dimension/ property 成員的static filed rank

3 static field rank 是根據search interface 裏的成員列表的順序決定的。

 

對於cross-filed我們默認的分數是0,但是我們也可以在Developer Studio改變他的indexator.

舉個例子:

MatchMode: All

SearchInterface: All

Search Term: Nike Plastic

Search Interface 裏默認的字段:

material,color,displayName.(注意material是第一個,默認的rank值最高)

CROSS_FIELD_BOUNDARY="ALWAYS/ON-FAILURE"



 當前Filed Match 如果匹配上material的,那麼就會放在最上面一層,依次是sku.color,clor,sku.displaName等等。最後呈現給用戶的就是依照這個層次放的順序結果。

匹配的上的話那麼

FieldMatch:materia

匹配不上的話:

 

Field: cross-field (null)

  • stratum rank - 0
  • evaluation time - 0.0012 ms

Frequency(Freq):

在result text裏,基於用戶的query term發生的次數進行一個打分,越多分數越高。

一般會分成1-N個層次:

那麼取決於你的result text 包含這個terms的多少。如果只有1個,那麼只有一層:

strata:1, 如果有N個,那麼 stata:N

那麼最多的會最先呈現給用戶。




 

Glom:

對單字段的匹配優先於多字段的匹配。一般和MaxFiled module搭配使用。在這種模式下,MatchAny 對於 cross-fileds來講是無效的的額,因爲每一個單獨的term

都可以是作爲single-field.

 

假設當前

Search Terms: Nike Shoes
Search Interface: all
Match Mode: matchAll

 

當我搜索的時候,首先匹配Match All,即字段包含Nike 且包含 Shoes,那麼纔會進行相關度的排序。

然後針對單個字段排名,排名排完了,然後根據cross-filed是否啓用,如果啓用,那麼glom

只有2層,如果沒啓用只有1層。在cross-field的時候,比如我有兩個字段都包含Nike Shoes,那麼多字段匹配纔會把這個記錄放在本層。



 

 一般會考慮到要有足夠的term來滿足搜索,那麼一般都會放在NTerms後面。

 

Interpreted:

 

1 非partial 的 match 排名排在partial的前面

2 單字段匹配排民優先於cross-field匹配

3 非拼寫檢查的排名排在拼寫檢查的前面

4 同義詞匹配的排名在非同義詞匹配的後面

5 Stemming匹配的排名排在非stemming的排名的後面

 

 Maximum Field

 

其實和Field排名模塊差不多,除了在跨字段匹配的時候有一點區別:

不像Filed,分配一個靜態的分數給cross-filed 匹配,而MaxField會選擇rank值對於匹配來講最高的字段

 

Numfields

 

 什麼意思呢?根據結果集裏面,當前匹配模式下,包含用戶query term的字段越多,rank值越大,排名越靠前

比如:

RecordA:

sku.displayName:Nike Shoes

sku.description: Alert Frame Nike Shoes

RecordB:sku.displayName:Nike

因爲Record A 有兩個字段包含用戶search的 query item。而RecordB只有一個字段,所以RecordA的 排名在Record的前面。


 NTerms:

 意思是用戶提供的query terms, 包含的單詞越多的,排名越靠前,越少的越在後面,比如Nike Shoes, 全部匹配的在rank值高於僅僅匹配一個Nike 或者Shoes的記錄。



 

Phrase

表示用戶的term 全部精確匹配或者 部分作爲一個phrase進行匹配,匹配度越高,rank值越高,沒有的匹配就排在最後面。

The Phrase options are:
• Rank based on length of subphrases
• Use approximate subphrase/phrase matching
• Apply spell correction, thesaurus, and stemming

 

Static

給每一個結果打分,打分基於一個數字或者常量值,要取決於搜索的類型和傳遞給模塊的參數,第一個參數是property 或者dimension,第二個參數爲排序參數。

For example, using the module Static(Availability,descending) would sort result records in descending
order with respect to their assignments from the Availability property. Using the module
Static(Title,ascending) would sort result records in ascending order by their Title property assignments.

 

Relevance Ranking strategies are used in two main contexts in the MDEX Engine:在MDEX Engine有兩種排名策略:

1 在search interface裏面配置

2 在查詢級別去設置,然後覆蓋掉search interface的排名策略。比如通過url 查詢,在查詢的時候我們可以設置參數:

Nrk=search-interface
Nrt=relrank-terms

Nrr=relrank-strategy
Nrm=relrank-matchmode

For Example:<application>?N=0&Ntk=P_Description&Ntt=sonoma
&Nrk=All&Nrt=citrus&Nrr=maxfield&Nrm=matchall

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章