Install P4 Search

After you have installed Elasticsearch, you can install P4 Search. Part of the installation of P4 Search requires setting up an initial configuration.

P4 Search is a self-contained Java application designed and tested against AdoptOpenJDK Java 17. The Windows installers and Linux packages deploy their own Java runtime environment (OpenJDK 17) and wrap it as a service.

Before you begin

  • You must have a P4 Server server running (P4 Server 2024.1 or later).

  • Ensure you are using a supported platform:

    • Linux: Ubuntu 20.04, 22.04, 24.04, or RHEL 8, 9
    • Windows: Windows Server 2019, or Windows Server 2022
  • Install Elasticsearch (Elasticsearch 8.12.1 to 8.19.3 are supported) and start up a server.

  • (Optional:) If you want to secure your P4 Search communications, you need to create a Java keystore. To learn more, see Secure P4 Search communications.

Install P4 Search

P4 Search can be installed on Linux or on Windows. To see what your installation directory should look like after P4 Search has been installed, see Installation layout.

Advanced users: You can allocate more memory to P4 Search by setting -Xms and -Xmx in the vmoptions file:
  • Linux: /opt/perforce/helix-p4search/sbin/p4search.vmoptions
  • Windows: C:\Program Files\Perforce\helix-p4search\sbin\p4search.vmoptions

By default, there are no settings for these.

Install P4 Search on Linux

  1. Import the Perforce package signing key and configure the Perforce package repository on the server hosting P4 Plugin Filter. To do this, see Install the P4 Plugin Filter.

  2. Install the P4 Search package on the server hosting P4 Search.

    Follow the instructions for your OS distribution:

  3. Configure P4 Search. See Configure P4 Search for the first time.

  4. Restart the P4 Search service:
  5. Follow the instructions for your OS distribution:

  6. Check that everything is working as expected from the Service Status page. See Check the status of P4 Search. You might need to log in to view the page.

Install P4 Search on Windows

To learn how to install P4 Search on Windows, watch the following video or review the instructions that come after it.

  1. Review the process overview. See P4 Server requirements.
  2. Check that you have met the prerequisites before starting the installation. See System requirements.
  3. Download the P4 Search installer from the P4 Search download page on the Perforce website.
  4. Double click on the installer to start it. When prompted, confirm that you want the installer to make changes to your computer.
  5. To start the installation process, click Next.
  6. Accept the license agreement to continue with the upgrade and click Next.
  7. Select a destination folder for the installation and click Next.

    P4 Search is installed at the selected location.

  8. Configure the P4 Search service and click Next.
  9. By default, the P4 Search service is public to machines on the same network.

    You can configure the P4 Search web service to use HTTPS. See Secure P4 Search communications.

  10. Configure the P4 Server and click Next.
  11. Configure the Elasticsearch connection and click Next.
  12. Configure image detection and click Next.
  13. Configure speech recognition and click Next.
  14. To complete the installation, click Finish.
  15. To fully configure P4 Search, do one of the following as an admin user:
    • Open the configuration webpage using the connection details you set for the P4 Search service during the installation.
    • Edit the config.properties file in the installation directory.

Installation layout

The directory layout after installation depends on the operating system, but is typically located under:

  • Linux: /opt/perforce/helix-p4search/...
  • Windows: C:\Program Files\Perforce\helix-p4search\...

The standard layout is as follows:

  - etc/
    - config.properties                          (configuration information for the P4 Search service)
    - configure.sh                               (script file to configure P4 Search)
    - indexFilter.json                           (location where index filter mappings are saved)
    - typesFilter.json                           (stores all the different file types) 
    - debug-log4j2.xml                           (sample log configuration file for debug level) 
    - info-log4j2.xml                            (sample log configuration file for debug info) 
    - log4j2.xml                                 (standard log configuration file) 
    - mapping.json                               (standard Elasticsearch field mappings) 
    - settings.json                              (standard Elasticsearch index settings)
    - policy.json                                (stores the configuration settings, including default 
                                                  values, for a specific policy or set of rules) 
    - truststore.jks                             (location of P4 Search's local trust store)
  - jre/                                         (Java Runtime)
  - lib/
    - f3d/                                       (F3D application binaries. Used to create 2D preview images
                                                  if Blender is not present)
    - 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)
    - p4search-xxx.jar                           (P4 Search service)
    - p4search-filter-8.12.1-xxxx.zip            (Elasticsearch filter plugin for Elasticsearch 8.12.1)
    ...
    - p4search-filter-8.19.3-xxxx.zip            (Elasticsearch filter plugin for Elasticsearch 8.19.3)
  - log/
    - error.log                                  (service wrapper error log)
    - p4search.log                               (P4 Search service log)
  - sbin/
    - p4search                                   (service wrapper)
    - p4search.vmoptions                         (wrapper JVM options)
  - tmp/                                         (temporary file directory)
  - jnl/                                         (keeps track of index requests)
    - RenderQueue.jnl                            (render queue)
    - BackgroundIndexQueue.jnl                   (background index queue)
    - IndexQueue.jnl                             (index queue)
    - *.tmp                                      (temporary files in the process of recovery)
    - *.ckp                                      (checkpoint files)

Next steps

Related topics