Use function query for boosting score in Solr

爷,独闯天下 提交于 2019-11-29 07:32:09

You can try using the _val_ hook provided by Solr.

For instance, in order to sort by score * popularityrank, try using this

http://solr:8983/solr/select?q=hp%20laptop&_val_="product(score,popularityrank)"

Use query() function to get the value of 'score' instead.

So if you're trying for this: new_score = score * popularity , use the following format.

q=searchterm&sort=product(query($q),popularity) desc

query($q) - returns the TF-IDF score for the query. So this is the equivalent of using the 'score' field.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!