Well, first be aware that the scores are not comparable across different queries. So any rule like "don't show any score < X" is meaningless. A _very_ good match at the top position (as judged by humans) for one query might score less than X, and a poor match for another query that was nonetheless the top scorer might be > X.
So I'm assuming you're talking about "bucketing", a single query, i.e. one star, two stars, three stars, 4 stars. This is actually pretty straight forward. Just put 4 stars next to the output if it's > 80% of the top score. 3 stars if 60%< doc score < 80% etc. Or cut off your list when it's less than, say, 50% of the max score. Or whatever. But I'm almost going to guarantee that doing this is not useful. It's a "feel good" thing sometimes displayed on web pages for search results that's misleading information IMO. When presenting results to users, they rarely look beyond the first 10 docs or so, so what good is it? Or is there some other use case (which you haven't defined) that you're trying to satisfy? This feels like an XY problem. Best, Erick On Sat, Jul 12, 2014 at 12:20 AM, Rajendra Rao <rajendra....@launchship.com> wrote: > Hi > > We used apache lucene for ranking documents .We have documents with its > score .Now our requirements is to set a threshold so that we can show > that documents has matched ,no matched ,or partial match based on the > threshold .How can we set this threshold because match score has decimal > number and it is also variable ? > please guide us. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org