Setup
To use the Sophora Web App Framework's Solr client, make sure to import the SolrSpringConfig (e.g. via auto configuration) to load all spring classes of this module.
Maven dependency
<dependency>
<groupId>com.subshell.sophora.webapp</groupId>
<artifactId>sophora-webapp-solr</artifactId>
<version>x.y.z</version>
</dependency>
Configuration
To configure the Solr client you need to adapt your application.yml. All configuration parameters start with the solr prefix.
Parameters
| Parameter | Description | Default |
|---|---|---|
url | The URL of the Solr server. May be left blank if zkhosts is used. | - |
user | Solr user name. Must not be set, if tokenFile is configured. | - |
password | Solr password. | - |
tokenFile | A File containing the Solr bearer token. Must not be set, if user is configured. | The default file path is /var/run/secrets/tokens/solr. If such a file exists and contains a token, it will be used for authentication with Solr. |
cloudMode | Determines whether Solr Cloud is used. Default: false | - |
zkhosts | A comma separated list with no whitespace of at least one ZooKeeper host and port. Examples:
May be left blank if url is used. | - |
isLive | In case the Solr Cloud is used, determines whether live collections (those with a "-live" prefix) shall be used for searching content. Default: false | - |