Sha256: f858b6701be933f75c7011ee132b165cc8f600f4908a18e2466adce90c3efc1a

Contents?: true

Size: 1.3 KB

Versions: 32

Compression:

Stored size: 1.3 KB

Contents

module Sunspot
  # The Sunspot::Configuration module provides a factory method for Sunspot
  # configuration objects. Available properties are:
  #
  # Sunspot.config.solr.url::
  #   The URL at which to connect to Solr
  #   (default: 'http://localhost:8983/solr')
  # Sunspot.config.pagination.default_per_page::
  #   Solr always paginates its results. This sets Sunspot's default result
  #   count per page if it is not explicitly specified in the query.
  #
  module Configuration
    class <<self
      # Factory method to build configuration instances.
      #
      # ==== Returns
      #
      # LightConfig::Configuration:: new configuration instance with defaults
      #
      def build #:nodoc:
        LightConfig.build do
          solr do
            url 'http://127.0.0.1:8983/solr'
          end
          master_solr do
            url nil
          end
          pagination do
            default_per_page 30
          end
        end
      end
      
      # Location for the default solr configuration files,
      # required for bootstrapping a new solr installation
      #
      # ==== Returns
      #
      # String:: Directory with default solr config files
      #
      def solr_default_configuration_location
        File.join( File.dirname(__FILE__), '../../solr/solr/conf' )
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 8 rubygems

Version Path
sunspot-1.3.3 lib/sunspot/configuration.rb
sunspot-1.3.2 lib/sunspot/configuration.rb
sunspot-1.3.1 lib/sunspot/configuration.rb
cb_sunspot-2.0.0.pre.5 lib/sunspot/configuration.rb
cb_sunspot-2.0.0.pre.3 lib/sunspot/configuration.rb
sunspot-1.3.0 lib/sunspot/configuration.rb
pduey-sunspot-1.2.1.1 lib/sunspot/configuration.rb
sunspot-1.3.0.rc6 lib/sunspot/configuration.rb
erichummel-sunspot-1.2.1g lib/sunspot/configuration.rb
erichummel-sunspot-1.2.1f lib/sunspot/configuration.rb
erichummel-sunspot-1.2.1b lib/sunspot/configuration.rb
erichummel-sunspot-1.2.1a lib/sunspot/configuration.rb
erichummel-sunspot-1.2.1 lib/sunspot/configuration.rb
lisausa-sunspot-1.2.1.1 lib/sunspot/configuration.rb
lisausa-sunspot-1.2.1 lib/sunspot/configuration.rb
sunspot_rbg-1.3.1 lib/sunspot/configuration.rb
sunspot_rbg-1.3.0 lib/sunspot/configuration.rb
ruben-sunspot-1.1.4 lib/sunspot/configuration.rb
ruben-sunspot-1.1.3 lib/sunspot/configuration.rb
ruben-sunspot-1.1.2 lib/sunspot/configuration.rb