environment-name
Background
Allows specifying profile and collection level configuration keys which are only to be respected when running under particular an environment. Keys that are only respected under a particular environment are called 'environment keys'. This is useful as multiple servers can share a single configuration file while reading different settings from that file. For example a 'development' server could be configured to run crawls for 5 minutes, while a 'production' server could be configured to run crawls for 5 hours.
This setting configures which environment the server is to use.
Environment keys are always picked in preference to non environment keys.
Keys that are defined in $SEARCH_HOME/conf/collection.cfg
can be overwritten
in the collection level configuration file $SEARCH_HOME/conf/COLLECTION/collection.cfg
.
However, if the environment key is defined in $SEARCH_HOME/conf/collection.cfg
it can not be
overwritten by a non environment key. It can only be overwritten by an environment key in the
same environment.
Environment keys can be set in the configuration editor UI. To access the configuration editor UI,
go to the Administration home page, and then under the Administer
tab, select either
Edit Collection Configuration
or Edit Profile Configuration
. When editing a configuration key,
you can select an existing environment or create a new one from the dropdown menu in order to
set an environment specific configuration value.
Environment keys are in the form:
env.ENVIRONMENT.key
for example to display Freemarker errors under the dev
environment but not the prod
environment we could have:
env.dev.ui.modern.freemarker.display_errors=true env.prod.ui.modern.freemarker.display_errors=false
Setting the key
Set this configuration key in the server configuration.
Use the configuration key editor to add or edit the environment-name
key, and set the value. This can be set to any valid com.funnelback.config.data.environment.ConfigEnvironmentId
value.
Examples
To set the environment to 'dev' and have keys prefixed with env.dev.
be picked in preference to
non environment keys:
environment-name=dev
If $SEARCH_HOME/conf/collection.cfg
contained:
env.dev.foo=a0 env.dev.bar=b0
and $SEARCH_HOME/conf/COLLECTION/collection.cfg
contained:
foo=a1 env.prod.foo=a2 env.dev.bar=b1 plop=c0
Then that configuration would be read as:
foo=a0 bar=b1 plop=c0
Notes
The following configuration options do not completely support configuration environments:
-
access_restriction
-
collection
-
query_processor_options
-
security.earlybinding.locks-keys-matcher.ldlibrarypath
-
security.earlybinding.locks-keys-matcher.locking_model
-
security.earlybinding.locks-keys-matcher.name
-
service_name
-
spelling_enabled
-
ui_cache_link