: : I have a suggestion for improving relevance functions in Solr by way of : providing access to a set of pre-defined constants in Solr queries. : Specifically, the number of documents indexed, the number of unique terms in : a field, the total number of terms in a field, etc. are some of the : query-time constants that I believe can be made use of in function queries : as well as boosted queries to aid in the relevance calculations.
I'm not sure if he was inspired by your email or not, but i did notice yonik just opened an issue that sounds very similar to this... https://issues.apache.org/jira/browse/SOLR-1932 FWIW: number of unique terms in a field is reall, really, expensive to compute (although perhaps we could cache it somewhere) -Hoss