Module: Sunspot::Adapters
- Defined in:
- lib/sunspot/adapters.rb
Overview
Sunspot provides an adapter architecture that allows applications or plugin developers to define adapters for any type of object. An adapter is composed of two classes, an InstanceAdapter and a DataAccessor. Note that an adapter does not need to provide both classes - InstanceAdapter is only needed if you wish to index instances of the class, and DataAccessor is only needed if you wish to retrieve instances of this class in search results. Of course, both will be the case most of the time.
See Sunspot::Adapters::DataAccessor.register and Sunspot::Adapters::InstanceAdapter.register for information on how to enable an adapter for use by Sunspot.
See spec/mocks/mock_adapter.rb for an example of how adapter classes should be implemented.
Defined Under Namespace
Classes: DataAccessor, InstanceAdapter