public class CmsSolrConfiguration extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONF_FOLDER
The 'conf' folder inside the Solr home directory.
|
static java.lang.String |
DEFAULT_CONFIGSET_FOLDER
The default config set path.
|
static int |
DEFAULT_MAX_PROCESSED_RESULTS
The default maximum number of results to return in a Solr search.
|
static java.lang.String |
SOLR_CONFIG_FILE
The Solr configuration file name.
|
static long |
SOLR_DEFAULT_COMMIT_MS
The default max time in ms before a commit will happen (10 seconds by default).
|
static java.lang.String |
SOLR_HOME_DEFAULT
The default name of the Solr home directory.
|
static java.lang.String |
SOLR_HOME_PROPERTY
The system property name for the Solr home directory.
|
static java.lang.String |
SOLR_SCHEMA_NAME
The Solr schema name.
|
| Constructor and Description |
|---|
CmsSolrConfiguration()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHome()
Returns the home directory of Solr as String.
|
java.lang.String |
getHomeFolderPath()
Returns the configured Solr home.
|
int |
getMaxProcessedResults()
Returns the maximal number of results processed when querying a Solr index.
|
java.lang.String |
getServerUrl()
Returns the servers URL if embedded is set to
false. |
long |
getSolrCommitMs()
Returns the max time (in ms) before a commit will happen.
|
org.apache.solr.core.SolrConfig |
getSolrConfig()
Returns the Solr configuration (object representation of
'solrconfig.xml'). |
java.io.File |
getSolrConfigFile()
Returns the solr configuration file, default:
'conf/solrconfig.xml'. |
java.io.File |
getSolrFile()
Returns the Solr xml file, default:
'solr.xml'. |
java.lang.String |
getSolrFileName()
Returns the Solr xml file name, default:
'solr.xml'. |
org.apache.solr.schema.IndexSchema |
getSolrSchema()
Returns the Solr index schema.
|
java.io.File |
getSolrSchemaFile()
Returns the Solr index schema file.
|
boolean |
isEnabled()
Returns
true if the Solr server is embedded, false otherwise. |
void |
setEnabled(java.lang.String isEnabled)
Sets the enabled flag.
|
void |
setHomeFolderPath(java.lang.String homeFolderPath)
Sets the home folder for Solr.
|
void |
setMaxProcessedResults(java.lang.String maxProcessedResults)
Sets the maximal number of results processed for a query to a Solr index.
|
void |
setServerUrl(java.lang.String url)
Sets the external servers URL, should be not null if the embedded falg is
false. |
void |
setSolrCommitMs(java.lang.String time)
Sets the max time (in ms) before a commit will happen.
|
void |
setSolrFileName(java.lang.String name)
Sets the Solr file name.
|
public static final java.lang.String DEFAULT_CONFIGSET_FOLDER
public static final java.lang.String CONF_FOLDER
public static final java.lang.String SOLR_CONFIG_FILE
public static final int DEFAULT_MAX_PROCESSED_RESULTS
public static final long SOLR_DEFAULT_COMMIT_MS
Can be configured in 'opencms-search.xml'.
public static final java.lang.String SOLR_HOME_DEFAULT
public static final java.lang.String SOLR_HOME_PROPERTY
public static final java.lang.String SOLR_SCHEMA_NAME
public CmsSolrConfiguration()
public java.lang.String getHome()
public java.lang.String getHomeFolderPath()
public int getMaxProcessedResults()
public java.lang.String getServerUrl()
false.public long getSolrCommitMs()
public org.apache.solr.core.SolrConfig getSolrConfig()
'solrconfig.xml').public java.io.File getSolrConfigFile()
'conf/solrconfig.xml'.public java.io.File getSolrFile()
'solr.xml'.public java.lang.String getSolrFileName()
'solr.xml'.public org.apache.solr.schema.IndexSchema getSolrSchema()
public java.io.File getSolrSchemaFile()
public boolean isEnabled()
true if the Solr server is embedded, false otherwise.true if the Solr server is embedded, false otherwisepublic void setEnabled(java.lang.String isEnabled)
isEnabled - true, if the Solr server should be used, false otherwisepublic void setHomeFolderPath(java.lang.String homeFolderPath)
homeFolderPath - the Solr home folder to setpublic void setMaxProcessedResults(java.lang.String maxProcessedResults)
The globally set value can be overwritten for each index.
maxProcessedResults - the maximal number of results processed for a query to a Solr index.public void setServerUrl(java.lang.String url)
false.url - the URLpublic void setSolrCommitMs(java.lang.String time)
time - the time as long valuepublic void setSolrFileName(java.lang.String name)
name - the file name to set