: Is there a way to calculate a theoretical max score for the current query?
there's been some discussion on this on the java-user list over the years ... the short answer is "yes it's possible, but only in very controlled situations" ... as i recall it depended on limiting the set of possible Query classs (because it's possible to write a Query object with an unpredictable max score) and having a Similarity implementation that returns bounded values. : This would be the same score you'd get if a document matched the query : exactly. For example: but the concept of an "exact" match is very missleading ... even for a simple term query, a document contain exactly the term specified and nothing more isn't neccessarily the highest scoring doc for that query -- it depends on how the Similarity class defines lengthNorm and what the tf function look like -- a doc that has the term repeated multiple times along with lots of other "crap" terms might score higher in some cases (ie: constant lengthNorm, or expotential tf function) there is no generic solution that will work for this ... just solutions that work in specific cases. -Hoss