1/sqrt(numTerms)
.
Matches in longer fields are less precise, so implementations of this method usually return smaller values when numTokens
is large, and larger values when numTokens
is small.
Note that the return values are computed under {@link org.apache.lucene.index.IndexWriter#addDocument(org.apache.lucene.document.Document)} and then stored using {@link #encodeNorm(float)}. Thus they have limited precision, and documents must be re-indexed if this method is altered. @param fieldName the name of the field @param numTokens the total number of tokens contained in fields namedfieldName of doc. @return a normalization factor for hits on this field of this document @see org.apache.lucene.document.Field#setBoost(float)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|