Configure P4 Search
This section contains information about how to Configure P4 Search from the web UI.
-
You must be an administrator to configure P4 Search.
-
The P4 Search service must be configured to view the Service status page and to configure services using the Configuration page:
-
Windows installer: Basic P4 Search services are configured as part of the installation process.
-
Linux installation: The P4 Search service must be configured manually by editing the etc/config.properties file. See Configure the P4 Search service.
-
To configure P4 Search from the web UI:
-
Select the Account arrow from the top navigation bar.
-
Select Configure and the Configuration page is displayed.
-
Expand the configuration you want to edit, and make your changes.
-
Image auto-tagging configuration (P4 DAM only)
-
To update the configuration with your changes, select Apply. You may need to restart P4 Search.
P4 Search configuration
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
Product Name |
com.perforce.p4search.service.product |
p4search |
The name that is shown in the P4 Server log. |
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. Options are: http or https. |
Java Keystore Location |
com.perforce.p4search.service.keystore |
empty |
Only applies if protocol is set to https. The location of the Java Keystore. See Optional HTTPS security settings. |
Java Keystore Password |
com.perforce.p4search.service.keypass |
empty |
Only applies if protocol is set to https. The location of the Java Keystore. See Optional HTTPS security settings. |
Java Truststore Location |
com.perforce.p4search.service.truststore |
./etc/truststore.jks |
Location of the P4 Search local trust store. |
Java Truststore 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 |
Cross Origin Resource Sharing (CORS). Specify origins for the browser to allow resource access. Include your domain along with the protocol and port number. Supports comma separated values. For example, https://*.mydomain.com:1601,https://*.mydomain.com:1602 If the CORS value is left blank, the external URL value is used as an allowed origin along with the protocol and port number. To secure your site, https protocol must be used. |
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). |
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/ |
The URL of the P4 Search help documentation. Enables you to change the URL of the help document. For example, if 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 to be displayed through the websocket. |
Global rate limit |
com.perforce.p4search.service.global-rate-limit |
600 |
The number of requests per minute for all API endpoints. Default value: 600 requests. |
Login rate limit |
com.perforce.p4search.service.login-rate-limit |
5 |
The number of login requests per minute for all API endpoints. Default value: 5 requests. |
JWT Access token |
com.perforce.p4search.service.access-token-ttl |
600 |
The duration after which the JWT Access token expires. Default value: 600 seconds. 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 after which the JWT Refresh token expires. Default value: 900 seconds. 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. Default value: false. 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 Basic search. |
P4 Server configuration
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
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. |
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. For instructions on creating the Perforce Service User and printing out the ticket, see Create the Perforce Service user .
|
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 Create the Index user . 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 |
|
empty |
The P4IGNORE file name. |
Automatic update flag for extensions |
|
true |
A flag to indicate during start-up that if extensions are out of date, then they must be automatically updated, set to true. |
Maximum sync filesize | com.perforce.p4search.core.maxfilesize | 1073741824 | Filesize limit when syncing from Perforce (default 1GB). |
Indexer configuration
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
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 Elasticsearch batch size when indexing data. |
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.
|
Thumbnail/preview image size |
com.perforce.p4search.index.preview-size |
1440 |
Thumbnail/preview image size in pixels. Set to 0 to disable preview generation. |
Thumbnail/preview image type | com.perforce.p4search.index.preview-ext | jpg |
Thumbnail/preview image type only supports jpg and webp image file types. |
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).
For more information on how to install 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. This location is relative to the P4 Search install location. For example, com.perforce.p4search.index.journal-path=./jnl |
Journal rebuild threshold |
com.perforce.p4search.index.journal-threshold |
1000 |
Rebuilds the journal when the completed tasks exceed the threshold. Default value: 1000 tasks. |
Elasticsearch configuration
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
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 |
Elasticsearch username |
com.perforce.p4search.elastic.user |
empty |
Elasticsearch User for P4Search. |
Elasticsearch password |
com.perforce.p4search.elastic.pass |
empty |
Elasticsearch Password for P4Search. |
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 Server p4search-filter plugin for Elasticsearch. See the Elasticsearch plugin documentation. Use of the P4 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 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. To trust a different certificate, see Configure self-signed certificate. |
Tika configuration
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
Parsing timeout (ms) |
com.perforce.p4search.tika.timeout |
20000 |
Timeout when parsing a file through Tika (in milliseconds). |
Max content file size |
com.perforce.p4search.tika.maxfilesize |
10485760 |
The max file size (in bytes) that P4 Search will try and index its content to. |
Image auto-tagging configuration
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
Enable image auto-tagging |
com.perforce.p4search.auto-detect.model |
empty |
Enable auto-tagging by specifying the detection model. Empty disables auto-image tagging. Valid models are:
|
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. |
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 you want to use for image files. For example: com.perforce.p4search.auto-detect.service=classification_21k In this example, the classification service is set to classification_21k for DeepDetect 21k pre-trained model. For more information about using a pre-trained model, see Getting the pre-trained model section of the Image classifier topic. |
Image Optical Character Recognition (OCR) configuration
The auto-ocr model uses the auto-tagging host, language, and key to configure the auto-ocr service.
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
Enable image Optical Character Recognition (OCR) |
com.perforce.p4search.auto-ocr.model |
empty |
Enable image Optical Character Recognition (OCR) by specifying the OCR model. Empty disables auto-OCR. Valid models are:
If Tesseract OCR is disabled or Tesseract OCR is not matched with a result, then P4 Search uses the auto-OCR model specified above.
For more information about Tesseract OCR, see Indexer configuration. |
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. |
Speech-to-text recognition configuration
-
Speech-to-text recognition can be used for audio and video files.
-
All audio and video files up to 60 seconds are referred to as short audios.
-
Audio or video files longer than 60 seconds are only supported for the AmazonTranscribeModel.
-
For all audio and video files up to 60 seconds, the audio is transcribed synchronously. Files longer than 60 seconds are skipped unless you are using the AmazonTranscribeModel.
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
Enable speech-to-text recognition |
com.perforce.p4search.auto-speech.model |
empty |
Enable speech-to-text recognition by specifying the auto-speech model. Empty disables auto-speech. Valid models are:
|
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 |
|
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. Audio or video files longer than 60 seconds are only supported for the AmazonTranscribeModel.
|
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. |
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). |
Limitations
The speech-to-text recognition has the following limitations:
-
AmazonTranscribeModel
does not transcribe an mp4 file of 48000 sample rate. -
AzureSpeechModel and GoogleSpeechModel can transcribe only up to 60 seconds of audio and video files.
Rendering configuration
Configurable | Configurable name in config.properties file | Default | Description |
---|---|---|---|
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. |
Extension configuration
Displays all the available extensions for P4 Search. The slider indicates the state of a specific extension. For an available extension, click the slider to install or delete the extension.
P4 Search Perforce extensions:
-
helix-core-search-ping.p4-extension checks if the external URL of your P4 Search instance is reachable.
-
helix-core-search-asset.p4-extension indexes your assets.
-
helix-core-search-indexer.p4-extension indexes your changes.
-
helix-core-search-obliterate.p4-extension removes obliterated files from the index.
Related information:
-
For more information on extensions, see P4 Server Administration Documentation.
-
For more information on managing extension endpoints, see Extension management API endpoints in Swagger P4 Search REST API.
-
For more information on how to access Swagger P4 Search REST API, see API endpoints.