Class | Ferret::Field |
In: |
lib/ferret/document.rb
|
Parent: | Array |
A Field is a section of a Document. A Field is basically an array with a boost attribute. It also provides pretty printing of the field with the to_s method.
The boost attribute makes a field more important in the index. That is, you can increase the score of a match for queries that match terms in a boosted field. You may, for example, want to boost a title field so that matches that match in the :title field score more highly than matches that match in the :contents field.
Note: If you‘d like to use boosted fields without having to use the Field class you can just include the BoostMixin in the Array class. See BoostMixin.