Sha256: 1b1d3e490345fa815c0d1516c92d058fc56b10c862e967e67354e1bd2968ebea

Contents?: true

Size: 894 Bytes

Versions: 29

Compression:

Stored size: 894 Bytes

Contents

module Sunspot
  module DSL
    # 
    # This top-level DSL class is the context in which the block passed to
    # Sunspot.query. See Sunspot::DSL::StandardQuery, Sunspot::DSL::FieldQuery,
    # and Sunspot::DSL::Scope for the full API presented.
    #
    class Search < StandardQuery
      def initialize(search, setup) #:nodoc:
        @search = search
        super(search, search.query, setup)
      end

      # 
      # Retrieve the data accessor used to load instances of the given class
      # out of persistent storage. Data accessors are free to implement any
      # extra methods that may be useful in this context.
      #
      # ==== Example
      #
      #   Sunspot.search Post do
      #     data_acccessor_for(Post).includes = [:blog, :comments]
      #   end
      #
      def data_accessor_for(clazz)
        @search.data_accessor_for(clazz)
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
sunspot-2.2.0 lib/sunspot/dsl/search.rb
sunspot-2.1.1 lib/sunspot/dsl/search.rb
sunspot-2.1.0 lib/sunspot/dsl/search.rb
sunspot-2.0.0 lib/sunspot/dsl/search.rb
sunspot-2.0.0.pre.130115 lib/sunspot/dsl/search.rb
gojee-sunspot-2.0.5 lib/sunspot/dsl/search.rb
sunspot-2.0.0.pre.120925 lib/sunspot/dsl/search.rb
sunspot_solr-2.0.0.pre.120924 sunspot/lib/sunspot/dsl/search.rb
sunspot_rails-2.0.0.pre.120924 sunspot/lib/sunspot/dsl/search.rb
sunspot-2.0.0.pre.120924 sunspot/lib/sunspot/dsl/search.rb
gojee-sunspot-2.0.4 lib/sunspot/dsl/search.rb
gojee-sunspot-2.0.2 lib/sunspot/dsl/search.rb
sunspot-2.0.0.pre.120720 lib/sunspot/dsl/search.rb
sunspot-1.3.3 lib/sunspot/dsl/search.rb
sunspot-1.3.2 lib/sunspot/dsl/search.rb
sunspot-2.0.0.pre.120417 lib/sunspot/dsl/search.rb
sunspot-2.0.0.pre.120415 lib/sunspot/dsl/search.rb
sunspot-1.3.1 lib/sunspot/dsl/search.rb
erichummel-sunspot-2.0.0.pre.111215d lib/sunspot/dsl/search.rb
erichummel-sunspot-2.0.0.pre.111215c lib/sunspot/dsl/search.rb