开发者

How to score high of document containing "Burj Khalifa" in title and then in summary field in SOLR

开发者 https://www.devze.com 2023-01-03 02:25 出处:网络
I want to sort document by relevancy i.e. First all docs having \"Burj Khalifa\" in title and then in summary field? and sort by publishdate as well. means latest documents must have high score.

I want to sort document by relevancy i.e. First all docs having "Burj Khalifa" in title and then in summary field? and sort by publishdate as well. means latest documents must have high score.

criteria is like sort by score with publishdate

http://localhost:8080/solr/select?sort=score+desc,publishdate+desc&am开发者_C百科p;q=Burj Khalifa


I think you don't want sorting in this case, as it defines a strict ordering on the result set. Instead, I'd use DisMax with a FunctionQuery (see here to boost newer documents) and the qf parameter to boost the title field.

You'll have to play a bit with the boost values to get optimal results.

0

精彩评论

暂无评论...
验证码 换一张
取 消