Sha256: 81240e9a5937452f5d1aee2a17cf71ae1f248ded05756882eddd617b5b8ffe13

Contents?: true

Size: 858 Bytes

Versions: 19

Compression:

Stored size: 858 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::Query, Sunspot::DSL::FieldQuery, and
    # Sunspot::DSL::Scope for the full API presented.
    #
    class Search < Query
      def initialize(search) #:nodoc:
        @search = search
        @query = search.query
      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

19 entries across 19 versions & 7 rubygems

Version Path
Chrononaut-sunspot-client-0.9.4 lib/sunspot/dsl/search.rb
UnderpantsGnome-sunspot-0.9.1.1 lib/sunspot/dsl/search.rb
UnderpantsGnome-sunspot-0.9.8.1 lib/sunspot/dsl/search.rb
benjaminkrause-sunspot-0.9.7 lib/sunspot/dsl/search.rb
benjaminkrause-sunspot-0.9.8 lib/sunspot/dsl/search.rb
kristopher-sunspot-0.9.8 lib/sunspot/dsl/search.rb
kuahyeow-sunspot-0.9.7 lib/sunspot/dsl/search.rb
kuahyeow-sunspot-0.9.8 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.0 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.1 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.2 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.3 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.4 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.5 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.6 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.7 lib/sunspot/dsl/search.rb
outoftime-sunspot-0.9.8 lib/sunspot/dsl/search.rb
sunspot-0.9.8 lib/sunspot/dsl/search.rb
sunspot-0.9.7 lib/sunspot/dsl/search.rb