Method: Ferret::Document::Field#boost

Defined in:
lib/ferret/document/field.rb

#boostObject

This value will be multiplied into the score of all hits on this field of this document.

The boost is multiplied by Document#boost of the document containing this field. If a document has multiple fields with the same name, all such values are multiplied together. This product is then multipled by the value Similarity#length_norm(String,int), and rounded by Similarity#encode_norm(float) before it is stored in the index. One should attempt to ensure that this product does not overflow the range of that encoding.

See Document#set_boost(float) See Similarity#length_norm(String, int) See Similarity#encode_norm(float)

Note: this value is not stored directly with the document in the index. Documents returned from IndexReader#document(int) and Hits#doc(int) may thus not have the same value present as when this field was indexed.



30
31
32
# File 'lib/ferret/document/field.rb', line 30

def boost
  @boost
end