how do I normalise a solr/lucene score?

前端 未结 3 1631
自闭症患者
自闭症患者 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:40

    To quote http://wiki.apache.org/lucene-java/ScoresAsPercentages:

    People frequently want to compute a "Percentage" from Lucene scores to determine what is a "100% perfect" match vs a "50%" match. This is also somethings called a "normalized score"

    Don't do this.

    Seriously. Stop trying to think about your problem this way, it's not going to end well.

    That page does give an example of how you could in theory do this, but it's very hard.

提交回复
热议问题