org.apache.solr.core
Class SolrConfig

java.lang.Object
  extended by org.apache.solr.core.SolrConfig

public class SolrConfig
extends Object

Provides a static refrence to a Config object modeling the main configuration data for a a Solr instance -- typically found in "solrconfig.xml".

Version:
$Id: SolrConfig.java 486904 2006-12-14 00:15:45Z hossman $
Author:
yonik

Field Summary
static Config config
          Singleton containing all configuration.
static String DEFAULT_CONF_FILE
           
 
Constructor Summary
SolrConfig()
           
 
Method Summary
static SolrQueryRequest getPingQueryRequest(SolrCore core)
          Returns a Request object based on the admin/pingQuery section of the Solr config file.
static void initConfig(String file)
          (Re)loads the static configation information from the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONF_FILE

public static final String DEFAULT_CONF_FILE
See Also:
Constant Field Values

config

public static Config config
Singleton containing all configuration.

Constructor Detail

SolrConfig

public SolrConfig()
Method Detail

initConfig

public static void initConfig(String file)
                       throws ParserConfigurationException,
                              IOException,
                              SAXException
(Re)loads the static configation information from the specified file.

This method is called implicitly on ClassLoad, but it may be called explicitly to change the Configuration used for the purpose of testing - in which case it should be called prior to initializing a SolrCore.

This method should only be called for testing purposes. Because it modifies a singleton, it is not suitable for running multi-threaded tests.

Parameters:
file - file name to load
Throws:
ParserConfigurationException
IOException
SAXException
See Also:
Config.openResource(java.lang.String)

getPingQueryRequest

public static SolrQueryRequest getPingQueryRequest(SolrCore core)
Returns a Request object based on the admin/pingQuery section of the Solr config file.



Copyright © 2006 - 2006 The Apache Software Foundation