Module: Sunspot::Field
- Defined in:
- lib/sunspot/field.rb
Overview
The Field functionality in Sunspot is comprised of two roles:
- Field definitions
-
Field definitions encompass the information that the user enters when setting up the field, such as field name, type of access, data type, whether multiple values are allowed, etc. They are also capable of extracting data from a model in a format that can be passed directly to the indexer.
- Field instances
-
Field instances represent an actual field in Solr; thus, they are able to return the indexed field name, convert the value to its appropriate type, etc.
StaticField objects play both the definition and the instance role. DynamicField objects act only as definitions, and spawn DynamicFieldInstance objects to play the instance role.
Defined Under Namespace
Modules: Buildable, FieldInstance Classes: DynamicField, DynamicFieldInstance, StaticField