Class CmsSolrConfiguration

java.lang.Object
org.opencms.search.solr.CmsSolrConfiguration

public class CmsSolrConfiguration extends Object
The Solr configuration class.

Since:
8.5.0
  • Field Details

  • Constructor Details

  • Method Details

    • getHome

      public String getHome()
      Returns the home directory of Solr as String.

      Returns:
      the home directory of Solr as String
    • getHomeFolderPath

      Returns the configured Solr home.

      Returns:
      the configured Solr home
    • getMaxProcessedResults

      public int getMaxProcessedResults()
      Returns the maximal number of results processed when querying a Solr index. Each index has a configuration option to overwrite this global value.
      Returns:
      the maximal number of results processed when querying a Solr index.
    • getServerUrl

      public String getServerUrl()
      Returns the servers URL if embedded is set to false.

      Returns:
      the external servers URL
    • getSolrCommitMs

      public long getSolrCommitMs()
      Returns the max time (in ms) before a commit will happen.

      Returns:
      the max time (in ms) before a commit will happen
    • getSolrConfig

      public org.apache.solr.core.SolrConfig getSolrConfig()
      Returns the Solr configuration (object representation of 'solrconfig.xml').

      Returns:
      the Solr configuration
    • getSolrConfigFile

      Returns the solr configuration file, default: 'conf/solrconfig.xml'.

      Returns:
      the solr configuration file
    • getSolrFile

      public File getSolrFile()
      Returns the Solr xml file, default: 'solr.xml'.

      Returns:
      the Solr xml file
    • getSolrFileName

      Returns the Solr xml file name, default: 'solr.xml'.

      Returns:
      the Solr xml file name
    • getSolrSchema

      public org.apache.solr.schema.IndexSchema getSolrSchema()
      Returns the Solr index schema.

      Returns:
      the Solr index schema
    • getSolrSchemaFile

      Returns the Solr index schema file.

      Returns:
      the Solr index schema file
    • isEnabled

      public boolean isEnabled()
      Returns true if the Solr server is embedded, false otherwise.

      Returns:
      true if the Solr server is embedded, false otherwise
    • setEnabled

      public void setEnabled(String isEnabled)
      Sets the enabled flag.

      Parameters:
      isEnabled - true, if the Solr server should be used, false otherwise
    • setHomeFolderPath

      public void setHomeFolderPath(String homeFolderPath)
      Sets the home folder for Solr.

      Parameters:
      homeFolderPath - the Solr home folder to set
    • setMaxProcessedResults

      public void setMaxProcessedResults(String maxProcessedResults)
      Sets the maximal number of results processed for a query to a Solr index.

      The globally set value can be overwritten for each index.

      Parameters:
      maxProcessedResults - the maximal number of results processed for a query to a Solr index.
    • setServerUrl

      public void setServerUrl(String url)
      Sets the external servers URL, should be not null if the embedded falg is false.

      Parameters:
      url - the URL
    • setSolrCommitMs

      public void setSolrCommitMs(String time)
      Sets the max time (in ms) before a commit will happen.

      Parameters:
      time - the time as long value
    • setSolrFileName

      public void setSolrFileName(String name)
      Sets the Solr file name.

      Parameters:
      name - the file name to set