module Sunspot # # This module contains singleton objects that represent the types that can be # indexed and searched using Sunspot. Plugin developers should be able to # add new constants to the Type module; as long as they implement the # appropriate methods, Sunspot should be able to integrate them (note that # this capability is untested at the moment). The required methods are: # # +indexed_name+:: # Convert a given field name into its form as stored in Solr. This # generally means adding a suffix to match a Solr dynamicField definition. # +to_indexed+:: # Convert a value of this type into the appropriate Solr string # representation. # +cast+:: # Convert a Solr string representation of a value into the appropriate # Ruby type. # module Type # # Text is a special type that stores data for fulltext search. Unlike other # types, Text fields are tokenized and are made available to the keyword # search phrase. Text fields cannot be faceted, ordered upon, or used in # restrictions. Similarly, text fields are the only fields that are made # available to keyword search. # module TextType class <