Configure services used by Helix Search

Note

You must be a admin user to configure Helix Search.

Tip

Helix Search can also be configured using the Helix Search web page, see Configuring Helix Search services.

This section describes configuration of the Helix Search, Helix Core server, and Elasticsearch services.

Check the Helix Search status

To check the status of your Helix Search service, navigate to the status page using the connection details you set for the Helix Search service during the installation.

For example:

http://myhelixsearch.mydomain.com:1601/p4search/settings/status

Image of the Helix Search web status page

Configure the Helix Search service

This section details configuration of the Helix Search service including connection to external services such as, Helix server and Elasticsearch.

You can either edit the etc/config.properties file or use the web page.

To view and change the configuration of your Helix Search service, navigate to the configuration page (/settings/configure) using the connection details you set for the Helix Search service during the installation. If credentials are requested, provide Helix server credentials that are admin or greater.

For example:

http://myhelixsearch.mydomain.com:1601/p4search/settings/configure

Configure product and version

Helix Search has a product name and version configuration which is used in the Helix server log.

Default configuration:

com.perforce.p4search.service.product=p4search Product name visible in the Helix server log

com.perforce.p4search.service.version=0.1 Product version visible in the Helix serverlog

For example:

If you have multiple instances of Helix Search, we recommend that you append the product name to help distinguish between the log entries. For example:

com.perforce.p4search.service.product=p4search-1

com.perforce.p4search.service.product=p4search-2

Configure the web service

By default, the Helix Search web service is public to machines on the same network.

Default configuration:

com.perforce.p4search.service.protocol=http

com.perforce.p4search.service.host=0.0.0.0

com.perforce.p4search.service.port=1601

com.perforce.p4search.service.keystore= see SSL security for Helix Search

com.perforce.p4search.service.keypass= see SSL security for Helix Search

Tip

You can configure the Helix Search web service to use HTTPS, see SSL security for Helix Search.

Configure Helix server

The Helix server connection requires a P4PORT, a Perforce Standard User and a ticket.

Default configuration:

com.perforce.p4search.service.startup-retry=30000

com.perforce.p4search.core.p4port=localhost:1666

com.perforce.p4search.core.p4trust=

com.perforce.p4search.core.service.p4user=p4search

com.perforce.p4search.core.service.p4ticket=AEEB1208CB06479B022D97C2784EEFDA

com.perforce.p4search.core.index.p4user=p4index

com.perforce.p4search.core.index.p4ticket=AEEB1208CB06479B022D97C2784EEFDA

com.perforce.p4search.core.anonymous.p4user=anonymous

com.perforce.p4search.core.anonymous.p4ticket=

P4Port and Perforce Service User

Important
  • At security level 5 and above, the long lived ticket must be a local ticket and not an all hosts ticket.

  • Security level 6 requires the Helix server to have a valid server spec with the AllowedAddresses field set. For information about Security level 6, see Server security levels in the Helix Core Server Administrator Guide.

A Standard or Service user with a minimum of admin access. Used to authorize the proxy connection at security level 5 and above. For instructions on creating the Perforce Service User and printing out the ticket, see Creating the Perforce Service user .

For example:

com.perforce.p4search.core.p4port=perforce.com:1666
com.perforce.p4search.core.service.p4user=service
com.perforce.p4search.core.service.p4ticket=FFEEDDCCBBAA99887766554433221100

For an ssl enabled Helix server

If your Helix server is SSL enabled, add the ssl protocol to the p4port field and provide the trusted fingerprint in the p4trust field:

com.perforce.p4search.core.p4port=ssl:perforce.com:1666
com.perforce.p4search.core.p4trust=59:75:62:6C:4F:C9:53:F5:4A:30:90:FF:C9:60:01:10:C7:D0:ED:1F

Perforce Index User

Optional: A Standard user with admin access. Used to read content from the Helix server, to set file attributes, and to install extensions. For instructions on creating the Perforce Index User and printing out the ticket, see Creating the index user (optional). If the index user is not defined, the Perforce Service user is used.

For example:

com.perforce.p4search.core.index.p4user=index
com.perforce.p4search.core.index.p4ticket=AEEB1208CB06479B022D97C2784EEFDA

Anonymous user

Optional: An Anonymous user with read access in the Helix server for the areas of the depot you want to allow search result access to. The anonymous search user is used for the unsupported search web pages. For instructions on setting the Anonymous User and printing out the ticket, see Creating the anonymous search user (optional). If the anonymous user is not defined, anonymous access is disabled.

For example:

com.perforce.p4search.core.anonymous.p4user=anonymous
com.perforce.p4search.core.anonymous.p4ticket=

Allowed services

If you are using Helix Search with another service such as Swarm and are using Helix server security level 5 and above, provide a list of trusted IP addresses for the services.

For example:

com.perforce.p4search.core.allowed=swarm.perforce.com,proxy.perforce.com

Set Cross-Origin Resource Sharing (CORS)

Specify an origin for the browser to allow resource access, default is empty.

com.perforce.p4search.service.access-control-allow-origin=

Set the retry interval

The retry interval when locating Elasticsearch and Perforce Services, defaults to 30000 milliseconds..

com.perforce.p4search.service.startup-retry=30000

Configure the Index

Helix Search indexes Helix server data when called with the REST API, see Index endpoints.

The following configuration options determine the behavior of the indexer.

Set the index token

The index token, defaults to 00000000-0000-0000-0000-000000000000.

com.perforce.p4search.index.token=00000000-0000-0000-0000-000000000000

Set the maximum threads used for indexing

The number of threads Helix Search uses when indexing Helix server changelists, defaults to 8 threads.

com.perforce.p4search.index.threads=8

Set the maximum size of files that are indexed

The max file size (in bytes) Helix Search will try and index it's content, defaults to 10MB

com.perforce.p4search.tika.maxfilesize=104857600

Set the Helix Search timeout

The timeout used by Helix Search, defaults to 20000 milliseconds.

com.perforce.p4search.tika.timeout=20000

Set the maximum number of changes per single bulk request

The number of changes in a single bulk request to Elasticsearch, defaults to 1000 changes.

com.perforce.p4search.index.bulksize=1000

Set the trusted IP addresses for Helix Search

A comma separated list of IP addresses that are trusted by Helix Search.

com.perforce.p4search.core.allowed=

Set thumbnail generation

Set to true to generate the blur and thumbnail images when indexing is run, defaults to true.

  • Blur images are stored on the Helix server as an attribute of the original image file and indexed in Elasticsearch. They consist of a 4 pixel image stored as a Hash String that loads extremely quickly. Helix DAM displays the blur images for search queries while the thumbnail images are loaded.

  • Thumbnails are stored on the Helix server as an attribute of the original image files. They are up to 240 x 240 pixels depending on the original image's aspect ratio. P4V and Helix DAM use the thumbnails for image preview.

com.perforce.p4search.index.thumbnail=true

Configure results for user queries

User query results can be filtered by Helix Search. The following configuration options determine the behavior of the Helix Search filtering.

Filter search results for restricted changelists

To filter restricted changelists set the restricted field to true (this is the default and is recommended).

com.perforce.p4search.index.restricted=true

Filter search results by Helix server user permissions

To filter user search results based on their Helix server permissions (output of the p4 protect command), set the permission.required field to true. This requires the installation of the Helix server p4search-filter plugin for Elasticsearch, see the Elasticsearch plugin documentation. Default is true.

com.perforce.p4search.elastic.filter=true

Use of the Helix server p4search-filter plugin will introduce a small overhead in the query time. This is mainly determined by the number of protection entries that are applied to the user running the query. In some situations you might want to disable the filter if Helix Search only contains indexed data that is visible to all users.

Configure Elasticsearch

Tip

For more information on the Elasticsearch plugin, see the Elasticsearch plugin documentation.

Default configuration:

com.perforce.p4search.elastic.hosts=http://localhost:9200

com.perforce.p4search.index.name=perforce1

com.perforce.p4search.elastic.user=

com.perforce.p4search.elastic.pass=

com.perforce.p4search.elastic.tracktotalhits=10000

com.perforce.p4search.index.tags=

com.perforce.p4search.index.bulksize=1000

Configure Elasticsearch hosts

  1. Provide the configuration with a comma separated list of Elasticsearch hosts, for example:
  2. com.perforce.p4search.elastic.hosts=http://localhost:9200,http://localhost:9201

  3. Helix Search needs access to Elasticsearch to create and update a single index for the Helix server data. The name of the index is configured using:
  4. com.perforce.p4search.index.name=perforce1

    Note

    If you are using multiple instances of Helix Search ensure that you use a different index name for each instance.

Elasticsearch authentication

If your Elasticsearch instance requires authentication, add to the following empty fields to the configuration, default.

com.perforce.p4search.elastic.user=
com.perforce.p4search.elastic.pass=

Performance tuning

To tune performance:

  • Set a limit to the number of results processed by a single query, default is 10000.

  • com.perforce.p4search.elastic.tracktotalhits=10000

  • Set the Maximum ElasticSearch batch size used when indexing data, default is 1000.

  • com.perforce.p4search.index.bulksize=1000

Set the index tags

For use with Helix DAM only: Set the index tags as a comma separated list, by default there are no tags. Any tag that begins with an index tag value in the list is indexed. The index tags are not case sensitive.

com.perforce.p4search.index.tags=

For example:

com.perforce.p4search.index.tags=DAM,FOO

If DAM and FOO are index tags, Helix Search will index any tag that begins with DAM or FOO. In this example, the DAM_TAG_bar, DAM_tag_lorry, and FOO_bar tags would all be indexed but a tag called TAG_DAM would not be indexed.

Useful topics