看過的網(wǎng)站做記號(hào)百度站長(zhǎng)工具抓取診斷
ES打分機(jī)制
1.TF-IDF 詞頻-逆文檔頻率
2.Okapi BM25
3.隨機(jī)性分歧- DFR相似度
4.基于信息 - IB相似度
5.LM Dirichlet 相似度
6.LM Jelinek Mercer相似度
解釋一個(gè)查詢的結(jié)果集
curl -XPOST 'localhost:9200/get-together/_search?pretty' -H 'Content-Type: application/json' -d '
{"query": {"match": {"description": "elasticsearch"}},"explain": true
}'
使用function_score來(lái)定制得分
#在description字段中匹配到hadoop
#和logstash的文檔,分?jǐn)?shù)就乘以2或3
POST /get-together/_search
{"query": {"function_score": {"query": {"match": {"description": "elasticsearch"}},"functions": [{"weight": 2,"filter": {"term": {"description": "hadoop"}}},{"weight": 3,"filter": {"term": {"description": "logstash"}}}]}}
}
合并得分
1.每個(gè)單獨(dú)函數(shù)得分合并 score_mode
multiply,sum,avg,first,max,min
2.函數(shù)得分和原始得分合并 boost_mode
sum,avg,max,min,replace