ES設置字段搜索權重——Query-Time Boosting


Query-Time Boosting

In Prioritizing Clauses, we explained how you could use the boost parameter at search time to give one query clause more importance than another. For instance:

GET /_search { "query": { "bool": { "should": [ { "match": { "title": { "query": "quick brown fox", "boost": 2  } } }, { "match": {  "content": "quick brown fox" } } ] } } }

The title query clause is twice as important as the content query clause, because it has been boosted by a factor of 2.

A query clause without a boost value has a neutral boost of 1.

 

轉自:https://www.elastic.co/guide/en/elasticsearch/guide/current/query-time-boosting.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM