Configuration

Config files

The following configuration files are processed by smart.finder:

  • WEB-INF/classes/default-application.properties (DO NOT EDIT)
    This file contains all configuration options of smart.finder with their default values.

  • WEB-INF/classes/custom-application.properties
    If you change the working directory data.directory.location, you must adjust this file. All other adjustments are made in the following file.

  • [data.directory.location]/application.properties
    Editing this file is the recommended way to make configuration changes.
    By default, ${user.home}/.smartfinder is the working directory data.directory.location of smart.finder. The application.properties is not created automatically. You can use the WEB-INF/classes/application.properties file as a template. It is recommended to leave only the settings in the file that have been changed.

The format of the configuration files must correspond to the Java Properties file format .

Sample Properties file
# The files must be UTF-8 encoded, otherwise umlauts can cause errors!
# The safest way is to encode umlauts in Unicode syntax e.g: รค = \u00E4 (vgl. http://0xcc.net/jsescape/)

# Comments are preceded by a hash

# Common syntax:
key = value

# A value can reference another key
key1 = http://${key.with.server}/test
After changing one of the configuration files a restart of the web application or alternatively the entire Tomcat server is required.

Configuration parameters

This section describes the parameters that most often need to be changed in a default installation. Other parameters are described in comments in the WEB-INF/classes/default-application.properties file.

Both the client and the server have these configuration files. The following list does not distinguish between them. Stick to the respective default-application.properties file to change the parameters for the respective web application.
data.directory.location

Working directory where map.apps data (e.g. an HSQL database) is stored locally.

In case the Tomcat server is run as a Windows service, the .smartfinder directory is located in the user directory of the Tomcat user who started the service. Path separators must be specified as either / or \\.

Default: data.directory.location=$\{user.home\}/.smartfinder

proxy.allowedServerUrls

List of URLs that the Proxy Servlet may access.

smart.finder provides an integrated Proxy Servlet. Direct access to certain resources that are only accessible under another domain is prohibited due to security restrictions within JavaScript. This parameter defines corresponding exceptions. A ; must be placed after each URL. Each line, except the last, ends with a \.

finder.service.url

Context name of the smart.finder server.

If the name was changed during the installation of the smart.finder Server, the current name must be entered here.

Default: /ct-finder-server-webapp-2.1.0

solr.solr.home

Directory path to solr.home.

The path can be specified absolute or relative. You can also use placeholders that are resolved by the Web Container.

Example:

solr.solr.home = ${catalina.base}/webapps/ct-finder-server-webapp-[VERSION]/WEB-INF/solr.home

Security

security.mode

Protection mode of the smart.finder administrative area.

Access to the administrative areas of the smart.finder can be protected if required. To do this, the value of this parameter must be set to INTEGRATED (otherwise: NONE).
The mode ONLY_AUTHN can only be used in conjunction with security.manager Enterprise Edition.

Allowed values: INTEGRATED, NONE, ONLY_AUTHN
Default: INTEGRATED

If INTEGRATED was selected, the mode can be specified in more detail using the following parameter set:


security.user.admin.name

Username in plain text.

security.user.admin.pw

Password of the user.

This must be described according to the selected encoding.

security.user.pwenc

Encoding of the password.

This can be plain (no coding) or by means of MD5 (Message-Digest Algorithm 5) or SHA-1 (secure hash algorithm). Some web services support the generation of MD5 or SHA-1 encrypted passwords.

Allowed Values: plain, MD5, SHA-1

security.user.use_mapped_pass

Specifies whether a password encoding other than plain has been selected.

Allowed Values: true, false

security.ssl.trustAny

Specifies whether self-signed certificates are supported for HTTPS connections.

Allowed Values: true, false
Default: false


Mailing

mailing.host

Hostname on which an SMTP server is available for sending e-mails.

mailing.port

SMTP port on the SMTP host computer.

mailing.username

Username for the SMTP server.

mailing.password

Password for the SMTP server.

mailing.senderaddress

Reply address for e-mail dispatch.

mailing.locale

Language setting for sending e-mails.

Allowed Values: de, en

Logging

The following configuration parameters are available to adjust logging settings:

logging.logger.level

Level of detail of the log.

Allowed Values: TRACE, DEBUG, INFO, WARN, ERROR
Default: INFO

logging.output.location
Deprecated since 2.0.8
Use logging.file.location instead.
logging.file.location

Location where the log file is stored.

The default value corresponds to the logs directory of Tomcat. With the value ${data.directory.location}/logs the log file is created in the working directory of smart.finder.

Default: ${catalina.base}/logs

logging.file.prefix

This parameter defines the name of the log files.

To prefix log files with the URL context path of the smart.finder installation (for example smartfinder), use the value ${webcontext.name}.

Default: ct-smartfinder

Additional logging options are described in the default-application.properties file, for example to enable or disable logging into the console, into files, and GELF logging.

Changing the location of the index

In the standard delivery, the indexes of smart.finder are stored under the following path:

%TOMCAT%\webapps\ct-finder-server-webapp-[VERSION]\WEB-INF\solr.home

The indexes of the individual cores are stored in the subdirectories located here. To change the location of the indexes you have to change the value of the variable solr.solr.home in the file application.properties.

solr.solr.home=[absolute path]

After a restart, the indexes are stored in this directory.

Sort search results

In the standard configuration, the result of a search query to the index is sorted according to the hit probability score. In contrast, if results are to be sorted alphabetically according to a field (e.g. Title), the schema configuration of this field must be unique. This means that fields used by analyzers (including all fields of type text) can only be used for sorting search results if the analyzer generates exactly one single expression. Further restrictions for sorting can be found in the Solr documentation . To be able to sort on such fields nevertheless, these fields must be copied into a new field of a different type in the schema using copyField.

The following is an example for the field name:

  1. Change the schema.xml file.

    Adapted schema.xml
    <fields>
        [...]
        <field name="name" type="text" indexed="true" stored="true" required="false" multiValued="false"/>
        <copyField source="name" dest="name_string"/>
        <field name="name_string" type="string" indexed="true" stored="true" required="false" multiValued="false"/>
        [...]
    </fields>
  2. Save the file.

  3. Restart the smart.finder server or Apache Tomcat for the changes to take effect.

Configuration of synonyms of the facet values

Sometimes the terms used in the database for one thing are not consistent. You should combine synonyms according to the instructions below.

For example, the values shape and shapefile both refer to the same format. You can always display the values of the format facet as SHP in the user interface.

To configure this, 3 steps are necessary.

Step 1: Mapping values to synonyms

Enter the synonyms in the configuration file /ct-finder-server-webapp-2.1.0/WEB-INF/solr.home/core0/conf/lang/synonyms.txt.

For the above example, the following line would need to be added: shape, Shapefile => SHP.

The values before the arrow are also stored in the index. You can still search for shape and Shapefile, but also for SHP. In the attribute filter SHP is always displayed. A filter on the value SHP then includes all its synonyms.

Step 2: Synonym index linking

Link the synonyms to the field in the index.
To do this, open the file /ct-finder-server-webapp-2.1.0/WEB-INF/solr.home/core0/conf/schema.xml and find the field for whose values you define the synonyms.

In our example this is the field format:

<field name="format" type="string" indexed="true" stored="true" required="false" multiValued="true"/>

Directly below it, create a new field with type text_synonym, for example with the name format_facet and the following attributes:

<field name="format_facet" type="text_synonym" indexed="true" stored="true" required="false" multiValued="true"/>

If documents have a value for the field format when indexed, this value is also copied to the field format_facet. This field can be used as a facet and must then also be configured in the client configuration facetFields, see siehe Selection and sequence of filter attributes