Set of rules for Lucene relevance ranking

Lucene produces a .score. for each record, based on the following:

Scores embedded in the indexes:

Scores based on which index is matched, and how close that match is

Other scores

Lucene.s default scoring (which we can change)

How all this fits together, a guide to users:

58.815296 = weight(titleWords:"patrick white"~6^9.0 in 13441535), product of: (this means that the phrase Patrick White must appear within six words of each other in the title index to count as a hit. The number at the right is the number of document the query appears in. This score is made up of two calculated below: the queryweight, which measures the .importance. of the hits, and the fieldweight, which measures the number of hits - kinda)

0.30881515 = queryWeight(titleWords:"patrick white"~6^9.0), product of:

9.0 = boost (the boost we set for a title phrase match)

16.833977 = idf(titleWords: patrick=3222 white=28507) (this figure is a result of a formula run on the inverse document frequency of the query terms in the title index as a whole. The numbers in brackets refer to the number of times that the terms appear in the title index).

0.0020383059 = queryNorm (this is the result of a formula run measuring the idf of the query term in the whole database. It is stable for all results in this search . i.e. it is attached to the query, not to the record).

190.4547 = fieldWeight(titleWords:"patrick white" in 13441535), product of:

1.4142135 = tf(phraseFreq=2.0) (The phrase frequency here is 2 because there were two matches. The fact that it only gets 1.4 is because the words would not have been an exact phrase search (if so, it would have been 8 . 4x2 - so it has been discounted according to the formula set by Kent, and then multiplied by the number of times the phrase occurs in the field.)

16.833977 = idf(titleWords: patrick=3222 white=28507) (this is the same as the idf above)

8.0 = fieldNorm(field=titleWords, doc=13441535) (the field norm is calculated by a formula reflecting the inverse frequency of term hits in the field that the hits have occurred in. The shorter the field, the higher this score, and the number of occurrences of the searched on terms, also the higher the hits.)

This is just one section of the score. For all the hits in other fields, such as author, this whole process is repeated. Then at the end, the whole score is multiplied by a factor that represents the number of hits in the different fields and the number of holdings.