lib/sunspot/configuration.rb in kuahyeow-sunspot-0.9.8 vs lib/sunspot/configuration.rb in kuahyeow-sunspot-0.10.3
- old
+ new
@@ -5,10 +5,15 @@
# Sunspot.config.http_client::
# The client to use for HTTP communication with Solr. Available options are
# :net_http, which is the default and uses Ruby's built-in pure-Ruby HTTP
# library; and :curb, which uses Ruby's libcurl bindings and requires
# installation of the 'curb' gem.
+ # Sunspot.config.xml_builder::
+ # The library use to build XML messages sent to Solr. As of this writing the
+ # options are :builder and :libxml - the latter is faster but less portable,
+ # as it is native code. Check the documentation for RSolr::Message::Adapter
+ # for more information.
# 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
@@ -23,16 +28,32 @@
# LightConfig::Configuration:: new configuration instance with defaults
#
def build #:nodoc:
LightConfig.build do
http_client :net_http
+ xml_builder :builder
+
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