简体   繁体   中英

Tweaking Solr scoring function

在Solr 6.0.0中,我想根据匹配的字段(在索引和搜索xml文件中)调整得分,是否必须重写自己的相似性类?

Although you can use a custom Similarity, that's more useful for changing things like how term popularity effects score. Simply ranking different fields differently is typically what you use score boosts for.

q=foo:something^100 OR bar:something^10

I recommend reading https://wiki.apache.org/solr/SolrRelevancyFAQ and maybe take a look at the dismax query parser, which has a convenient notation for that kind of thing. See https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser (and the "qf" parameter)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM