P4 Search configuration reference

The following tables list configurations for P4 Search as they are displayed in the local config.properties file. See Configure P4 Search locally.

You can also configure P4 Search from the web UI. See Configure P4 Search from the web UI.

You must be an administrator to configure P4 Search.

Configure the P4 Search service

Configurable Name in config.properties file Default Details

Product name

com.perforce.p4search.service.product

p4search

The name that is shown in the P4 Server log. If you have multiple instances of P4 Search, consider modifying the product name to help differentiate them. For example:

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

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

Product version

com.perforce.p4search.service.version

0.1

The product version that is shown in the P4 Server log. Default value: the installed version of P4 Search.

Log configuration file

com.perforce.p4search.service.log

./etc/log4j2.xml

Set the file name for the P4 Search log.

Configuration file location

com.perforce.p4search.service.location

empty

The location of the configuration file in the file system.

Host address

com.perforce.p4search.service.host

0.0.0.0

The host IP address for the P4 Search service.

P4 Search service Port

com.perforce.p4search.service.port

1601

The port number for the P4 Search service.

Protocol

com.perforce.p4search.service.protocol

http

The protocol used for the P4 Search service. Public to machines on the same network by default. Options are http or https.

Java key store location

com.perforce.p4search.service.keystore

empty

The location of the Java Keystore. Only applies if protocol is set to https. See Secure P4 Search communications.

Java key store password

com.perforce.p4search.service.keypass

empty

The location of the Java Keystore. Only applies if protocol is set to https. See Secure P4 Search communications.

Java trust store Location

com.perforce.p4search.service.truststore

./etc/truststore.jks

Location of the P4 Search local trust store.

Java trust store password

com.perforce.p4search.service.trustpass

<PASSWORD>

Password for the P4 Search local trust store. This password is randomly generated.

(CORS) Allowed origin

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

empty

Specify origins for the browser to allow resource access. This type of permission is also known as Cross Origin Resource Sharing (CORS).

Include your domain along with the protocol and port number. Comma-separated values are supported. For example, https://*.mydomain.com:1601,https://*.mydomain.com:1602

If the CORS value is empty (the default), the external URL value is used as an allowed origin along with the protocol and port number. To secure your site, you must use https as the protocol.

Setup Retry Interval

com.perforce.p4search.service.startup-retry

30000

The retry interval used by P4 Search when locating Elasticsearch and P4 Server Services (in milliseconds).

Index auth-token

com.perforce.p4search.service.token

00000000-0000-0000-0000-000000000000

An X-Auth-Token to validate configuration requests.

Help URL

com.perforce.p4search.help.url

https://www.perforce.com/manuals/
p4search/Content/P4Search/Home-p4search.html

The URL of the P4 Search help documentation. Changing this URL is useful if, for example, you are running an isolated system and need to host it on your own server.

External URL

com.perforce.p4search.service.external-url

http://localhost:1601

The URL of your P4 Search instance as seen by other applications. For example, this external URL can be used by P4 Server or P4 DAM to connect to a specific instance of P4 Search.

Live log limit

com.perforce.p4search.service.live-log-limit

300

The number of live log lines displayed in the logging window of the P4 Search web UI.

Global rate limit

com.perforce.p4search.service.global-rate-limit

600

The number of requests allowed per minute for all API endpoints.

Login rate limit

com.perforce.p4search.service.login-rate-limit

5

The number of login requests allowed per minute for all API endpoints.

JWT access token

com.perforce.p4search.service.access-token-ttl

600

The duration after which the JWT Access token expires.

Ensure that the value of the JWT access token is always smaller than the value of the JWT refresh token.

JWT refresh token

com.perforce.p4search.service.refresh-token-ttl

900

The duration (in seconds) after which the JWT Refresh token expires.

Ensure that the value of the JWT refresh token is always greater than the value of the JWT access token.

Nonce token

com.perforce.p4search.service.nonce

false

A nonce token is a unique, random number or string that is used only once and then discarded. It acts as a security measure to prevent replay attacks in communication protocols, particularly in API requests.

The nonce token is included in the request header along with the authentication token, and it must be present in all API requests for security purposes. This practice ensures that each request is unique, even when the same authentication details are used.

To enable a nonce token, which is a unique string, set com.perforce.p4search.service.nonce to true.

Initial DSL query com.perforce.p4search.service.default-dsl-query +date: pastWeek The default DSL search query. See Perform a basic search.

Configure P4 Server

The P4 Server connection requires a P4Port, a Perforce Standard user, and a ticket.

If your P4 Server is SSL-enabled, set p4port to the ssl protocol and p4trust to the trusted fingerprint. For example:

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

Configurable Name in config.properties file Default Details

Perforce port

com.perforce.p4search.core.p4port

localhost:1666

The P4 Server RPC host and port. For example, perforce.com:1666, or ssl.perforce.com:1666 if protocol is set to https.

P4Trust

com.perforce.p4search.core.p4trust

empty

The p4trust trusted fingerprint.

Trusted Services

com.perforce.p4search.core.allowed

empty

A comma-separated list of trusted IP addresses for proxy services. For example, the IP address for your P4 Code Review instance.

If you are using P4 Search with another service, such as P4 Code Review, and are using P4 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

Perforce Service user

com.perforce.p4search.core.service.p4user

p4search

A Standard or Service user with a minimum of admin access. Used to authorize the proxy connection at Security level 5 and above. To learn more about creating the Perforce Service user and printing out the ticket, see P4 Server requirements.

Perforce service ticket

com.perforce.p4search.core.service.p4ticket

AEEB1208CB06479B022D97C2784EEFDA

The long-lived ticket to authorize the Perforce Service User. To print out a long-lived ticket for the Perforce service user that is valid for all hosts, run the following command : p4 -p <p4port> -u <p4user> login -a -p.

Perforce Index user

com.perforce.p4search.core.index.p4user

p4index

Optional:A Standard user with super access. Used to read content from the P4 Server, to set file attributes, and to install extensions. For instructions on creating the Perforce Index user and printing out the ticket, see P4 Server requirements. If the Index user is not defined, the Perforce Service user is used.

Perforce index ticket

com.perforce.p4search.core.index.p4ticket

AEEB1208CB06479B022D97C2784EEFDA

The long-lived ticket to authorize the index user. To print out a long-lived ticket for the index user that is valid for all hosts, run the following command : p4 -p <p4port> -u <p4user> login -a -p.

P4Ignore

com.perforce.p4search.core.p4ignore

empty

The P4IGNORE file name.

Automatic update flag for extensions

com.perforce.p4search.core.extension.auto-update

true

A flag to automatically update extensions during start-up.

Maximum sync file size com.perforce.p4search.core.maxfilesize 1073741824

File size limit (in bytes) when syncing from Perforce.

The maxfilesize limit is to prevent large synchronizations and to prevent indexing the entire server. If you increase this limit, you may need to increase the memory (RAM) on your P4 Search instance.

Configure the index

P4 Search indexes P4 Server data when called with the REST API. See the index endpoints in the Swagger P4 Search REST API.

Configurable Name in config.properties file Default Details

Perforce index

com.perforce.p4search.index.name

perforce1

P4 Search creates partitioned Elasticsearch indexes. Each index has a unique ID. This ID is used to create an alias (for example, alias-perforce1) and underlying indexes (for example, index-perforce1-000001). If you're using multiple indexes, ensure they have distinct IDs.

Restricted changes

com.perforce.p4search.index.restricted

true

Set to true to index restricted P4 Server changelists.

Elasticsearch batch size

com.perforce.p4search.index.bulksize

100

Maximum number of changes in a single bulk request to Elasticsearch.

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

Indexer thread pool size

com.perforce.p4search.index.threads

8

The number of threads P4 Search uses when indexing P4 Server changelists.

Generate thumbnail/preview images

com.perforce.p4search.index.thumbnail

true

Set to true (the default) to generate the blur and thumbnail/preview images when indexing is run.

  • Blur images are stored on the P4 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. P4 DAM displays the blur images for search queries while the thumbnail/preview images are loaded.

  • Thumbnails/previews are stored on the P4 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 P4 DAM use the thumbnails for image preview.

Thumbnail/preview image size

com.perforce.p4search.index.preview-size

1440

The thumbnail/preview image size (in pixels). Set to 0 to disable preview generation.

Thumbnail/preview image type com.perforce.p4search.index.preview-ext jpg

The thumbnail/preview image type. Only supports jpg and webp.

Enable Tesseract optical character recognition (OCR)

com.perforce.p4search.index.tesseract Disable

Set to Enable to enable Tesseract OCR.

For a Windows operating system, you must install Tesseract to use Optical Character Recognition (OCR).

To learn more about installing Tesseract, see Tesseract installer for Windows.

Location to store the live index journals

com.perforce.p4search.index.journal-path

./jnl

The location where the live index journals are stored, relative to the P4 Search install location.

Journal rebuild threshold

com.perforce.p4search.index.journal-threshold

1000

When the number of completed tasks exceeds the threshold, the journal is rebuilt.

Index file content into Elasticsearch

com.perforce.p4search.index.content

true

Enable/disable indexing file content into Elasticsearch.

Configure Elasticsearch

To learn more about the Elasticsearch plugin, see the Elasticsearch plugin documentation.

Configurable Name in config.properties file Default Details

Elasticsearch hosts

com.perforce.p4search.elastic.hosts

http://localhost:9200

A comma-separated list of host addresses for Elasticsearch. For example, http://localhost:9200,http://localhost:9201

To configure Elasticsearch hosts, P4 Search needs access to Elasticsearch to create and update the alias index for the P4 Server data. P4 Search creates a partitioned index.

If you are using multiple instances of P4 Search, make sure that you use a different index name for each instance.

Elasticsearch username

com.perforce.p4search.elastic.user

empty

Elasticsearch user for P4 Search. Use to configure Elasticsearch authentication.

Elasticsearch password

com.perforce.p4search.elastic.pass

empty

Elasticsearch password for P4 Search. Use to configure Elasticsearch authentication.

Permission filter required

com.perforce.p4search.elastic.filter

true

To filter user search results based on their P4 Server permissions (output of the p4 protect command), set to true.

This requires the installation of the P4 Serverp4search-filter plugin for Elasticsearch. See the Elasticsearch plugin documentation.

Use of the P4 Serverp4search-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 P4 Search only contains indexed data that is visible to all users.

Elasticsearch track total hits

com.perforce.p4search.elastic.tracktotalhits

10000

Maximum accurately counted total hit by Elasticsearch. To tune performance, set a limit to the number of results processed by a single query.

Elasticsearch self-signed certificate

com.perforce.p4search.elastic.insecure

true

To allow P4 Search to work with a self-signed Elasticsearch certificate, set to true (the default). To trust a different certificate, set to false and run the following command:

/opt/perforce/helix-p4search/jre/bin/keytool -importcert -alias elasticCA -keystore /opt/perforce/helix-p4search/jre/lib/security/cacerts -storepass changeit -file <location of your Elasticsearch certificate> -noprompt

where the location of your Elasticsearch certificate is located on the Elasticsearch host, /etc/elasticsearch/certs/http_ca.crt.

Configure image auto-tagging

To enable auto-tagging for images, specify an auto-tagging model. To learn more, see Connect an image tagging model

Configurable Name in config.properties file Default Details

Deep detection service

com.perforce.p4search.auto-detect.model

empty

The model used for auto-tagging images. An empty value (the default) disables image auto-tagging.

Supported models include:

  • AzureTagsModel (Azure)

  • RekognitionLabelsModel (AWS)

  • GoogleLabelModel (Google)

  • DeepDetectModel (DeepDetect)

Auto-tagging host

com.perforce.p4search.auto-detect.host

empty

The host IP address for the auto-tagging service.

Auto-tagging language

com.perforce.p4search.auto-detect.lang

empty

The language you to generate the image tags in. For example, en (English). For supported languages, see the documentation for your auto-tagging service.

Auto-tagging key

com.perforce.p4search.auto-detect.key

empty

The API key for the auto-tagging service you are using.

Auto-tagging threshold

com.perforce.p4search.auto-detect.threshold

0.1

The automatic image detection threshold as a floating point percentage. For example, 0.1=10%.

Auto-tagging best image result

com.perforce.p4search.auto-detect.best

10

The automatic best image detection results limit.

Auto-tagging classification service

com.perforce.p4search.auto-detect.service

empty

The classification service used for image files.

For example, classification_21k is the classification service for the DeepDetect 21k model.

To learn more about using a DeepDetect model, see the Getting the pre-trained model section of the DeepDetect server documentation.

Configure image auto-OCR

To enable automated optical character recognition (OCR) for images, specify an OCR model. To learn more, see Connect an OCR model.

To use OCR on Windows, you must install and enable Tesseract and ImageMagick. See Enable image OCR.

Configurable Name in config.properties file Default Details

Auto-OCR model

com.perforce.p4search.auto-ocr.model

empty

The model used for auto-OCR of images. An empty value (the default) disables auto-OCR.

Valid models include:

  • AzureOcrModel

  • RekognitionOcrModel

  • GoogleOcrModel

If Tesseract OCR is disabled or Tesseract OCR is not matched with a result, then P4 Search uses an auto-OCR model specified above.

To learn more about Tesseract OCR, see Configure the index.

Auto-tagging host

com.perforce.p4search.auto-detect.host

empty

The host IP address for the auto-tagging service.

Auto-tagging language

com.perforce.p4search.auto-detect.lang

empty

The language you want the image tags to be generated in. See your auto-detect engine for supported languages.

Auto-tagging key

com.perforce.p4search.auto-detect.key

empty

The API key for the auto-tagging service you are using.

Configure automated speech-to-text

To enable automated speech-to-text for audio and video files, specify an auto-speech recognition model. To learn more, see Connect a speech-to-text model.

All audio and video files up to 60 seconds are referred to as short audios.

  • AzureSpeechModel and GoogleSpeechModel can only transcribe up to 60 seconds of audio and video files.

  • For audio and video files up to 60 seconds, the audio is transcribed synchronously. Files longer than 60 seconds are skipped unless you are using AmazonTranscribeModel.

  • AmazonTranscribeModel does not transcribe mp4 files with a sample rate of 48000 Hz.

     
Configurable Name in config.properties file Default Details

Auto-speech recognition model

com.perforce.p4search.auto-speech.model

empty

The model used for automated speech-to-text for audio and video files. An empty value (the default) disables automated speech-to-text.

Valid models include:

  • AzureSpeechModel

  • AmazonTranscribeModel

  • GoogleSpeechModel

  • WhisperSpeechModel

Automatic speech recognition host

com.perforce.p4search.auto-speech.host

empty

The host IP address for the auto-speech service.

Automatic speech recognition transcription language

com.perforce.p4search.auto-speech.lang

empty

The language of the audio you want to be transcribed.

This configurable is optional for WhisperSpeechModel.

Automatic speech recognition API key

com.perforce.p4search.auto-speech.key

empty

The API key for the auto-speech recognition service you are using.

This configurable is optional for WhisperSpeechModel.

Automatic speech recognition threshold

com.perforce.p4search.auto-speech.threshold

0.6

Set the automatic speech recognition threshold for your auto-speech service as a floating point percentage. The automatic speech recognition threshold is the accuracy returned by your auto-speech service. For example, 0.6=60%.

In this example, when auto-speech threshold is set to 0.6, any transcription with 60% accuracy is accepted by the auto-speech service and anything below that is discarded.

Automatic speech recognition short audio transcribe limit

com.perforce.p4search.auto-speech.short-audio

60

Set the audio transcribe limit for your auto-speech service in seconds. Currently the default audio transcribe limit is set to 60 seconds and anything above that is discarded.

Automatic speech recognition cloud storage bucket

com.perforce.p4search.auto-speech.bucket

empty

The name of the cloud storage bucket or container where the large audio files will be stored. This is only available for AmazonTranscribeModel.

Automatic cloud processing timeout

com.perforce.p4search.auto-speech.timeout

1200

The timeout limit for short audio transcription processing from the cloud services (in seconds).

Configure rendering

Configurable Name in config.properties file Default Details

Render service

com.perforce.p4search.render.service

empty

The render service implementation. For example, AWSRenderService or LocalRenderService.

Rendering host

com.perforce.p4search.render.host

empty

Deprecated.

Rendering API key

com.perforce.p4search.render.key

empty

The rendering service API security key for use with AWSRenderService. The LocalRenderService uses the X-Auth-Token configured in Index auth-token.

Render 3D model

com.perforce.p4search.render.model

empty

The 3D model type for rendering service. For example, GLB.

Configure extensions

Extensions require P4 Server 2021.2 or later. If you are using an earlier version of P4 Server, you must use triggers and not extensions.

Extensions have no default value, but can instead be installed or deleted by using toggles on the P4 Search web UI. See Configure P4 Search.

Configurable Name in config.properties file Default Details

Helix Core Search Ping

helix-core-search-ping.p4-extension

N/A

Checks if the external URL of your P4 Search instance is reachable.

Helix Core Search Asset

helix-core-search-asset.p4-extension

N/A

Indexes your assets.

Helix Core Search Indexer

helix-core-search-indexer.p4-extension

N/A

Indexes your changes.

Helix Core Search Obliterate

helix-core-search-obliterate.p4-extension

N/A

Removes obliterated files from the index.

Related topics