how do I normalise a solr/lucene score?

前端 未结 3 1632
自闭症患者
自闭症患者 2020-12-01 06:51

I am trying to work out how to improve the scoring of solr search results. My application needs to take the score from the solr results and display a number of “stars” depe

3条回答
  •  情书的邮戳
    2020-12-01 07:25

    It's called normalized score (Scores As Percentages).

    You can use the following the following parameters to achieve that:

    ns = {!func}product(scale(product(query({!type=edismax v=$q}),1),0,1),100)
    fq = {!frange l=20}$ns
    

    Where 20 is your 20% threshold.

    See also:

    Remove results below a certain score threshold in Solr/Lucene?

    http://article.gmane.org/gmane.comp.jakarta.lucene.user/12076 http://article.gmane.org/gmane.comp.jakarta.lucene.user/10810

提交回复
热议问题