Skip to content

environment-name

Specifies the configuration environment the server is in.

Key: environment-name
Type: com.funnelback.config.data.environment.ConfigEnvironmentId
Can be set in: global.cfg

Description

Allows specifying profile and collection level configuration keys which are only to be respected when running under particular a 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 a 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

Default Value

By default environment-name is not set, thus by default all keys with an environment will be ignored.

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

⚠ Caveats

The following configuration options do not completely support configuration environments:

  • access_restriction
  • collection
  • collection_color
  • collection_root
  • data_root
  • document_level_security.custom_command
  • document_level_security.max2check
  • document_level_security.mode
  • query_processor_options
  • security.earlybinding.locks-keys-matcher.ldlibrarypath
  • security.earlybinding.locks-keys-matcher.locking_model
  • security.earlybinding.locks-keys-matcher.name
  • security.earlybinding.locks-keys-matcher.script
  • service_name
  • spelling_enabled
  • ui_cache_link

top

Funnelback logo
v15.24.0