Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Search Documentation | 2025.2

# Index P4 Search

You must be an admin user to perform indexing in P4 Search.

This section contains information about how to index the P4 Server from the P4 Search web UI.

To index P4 Search from the web UI:

1. Select the Account arrow from the top navigation bar.

2. Select Indexing and the Indexing tab is displayed.

## Add an index filter

You can include or exclude a specific depot path when indexing the P4 Server.

P4 Search provides a default mapping that excludes depots that are not local or stream, and it also excludes the following depot paths:

- //.swarm/...

- //.p4-extensions/...

- //.../.git/...

The index filter mappings are saved to the etc/indexFilter.json file.

To set filters on indexing your P4 Server:

1. Select the Filter tab.

2. Click Add and a dialog opens.

3. Enter the specific Depot Path you want to add the filter to.

4. Enter the Type of the filter. For example, INCLUDE or EXCLUDE.

5. Click Add to apply the filter.

## Filter on asset types

When indexing your P4 Server, you can filter assets based on their file type. This helps to speed up the indexing process and reduce the size of your Elasticsearch index.

The filter applies to the content of the file being indexed. This means that while the system will not index the actual content of the file (such as the text or contents of a .zip file), it will still index the meta-data associated with that file. The meta-data includes information like the file name, creation date, who created the file, and other relevant details.

For example, if you search for a file by name or other meta-data, it will show up in the results. However, if you're searching for content within the file (for example, the word "house" inside a .zip file), it will not appear in the results if the filter have been applied (because the content is not indexed).

File filter mappings are stored in etc/indexFilter.json file, and file types are stored in etc/typesFilter.json file.

By default, P4 Search includes the following file types for content indexing:

- SOURCE: various types of source code

- AUDIO: all audio files

- VIDEO: all video files

- IMAGE: all image files

- HEIC: HEIC files

- VECTOR: vector-based image files

- DIGITAL: digital files

By default, the following file types are excluded:

- EXECUTABLE: all executable files

- PACKAGE: all package files

- COMPRESS: all compressed file types

- UNKNOWN_TEXT: text files that P4 Search does not recognize

- UNKNOWN: any other unrecognized file types

To filter based on asset types:

1. Select the Types tab.

   All the available asset types are displayed.

2. Select an asset type once to filter indexed assets by that asset type. Select an asset type twice to exclude that asset type.

3. Click Save to apply your selection.

If there is a file type you would like P4 Search to support, email Perforce support.

## Indexing over a period of time

You can perform indexing based on specific time periods. Use the Index History slider to select the time period for which you want to perform indexing and click the Execute button.

The Index History slider provides the following time period options:

- Last Day: Indexes all changes committed in the previous day.

- Last Week: Indexes all changes committed in the last week.

- Last Month: Indexes all changes committed in the last month.

- Last Year: Indexes all changes committed in the last year.

- Everything: Indexes the entire P4 Server.

You should only use the Index Everything option the first time you index a server, or if you are re-indexing a small server. Indexing your entire P4 Server database can take a long time to complete.

- Custom: Indexes based on your selections in the Revision Ranges tab, Depot Path tab, and By User tab. See Custom indexing.

### Force update

Toggle Force Update to enable or disable re-indexing of existing indexed changes.

- When Force Update is enabled, P4 Search updates existing changes.

- When Force Update is disabled, P4 Search skips changes that have already been indexed.

## Custom indexing

You can customize your selections to perform indexing on the P4 Server by using the Revision Range, Depot Path, and User tabs. The tabs can be used on their own or combined to create custom indexing requests. For example, you can index a range of change numbers in a depot path for a specific user. If you combine tabs, don't click Execute or Index until you have finished setting up your indexing request.

### Revision Ranges tab

To perform indexing on a specific range of change numbers or dates (YYYY/MM/DD), in the Revision Ranges tab:

1. Enter the P4 Server change number or date you want to start indexing from and the change number or date you want to stop indexing at.

2. If you want to use more than one tab for your indexing request, set the other tabs before going to the next step.

3. Click Execute. A dialog appears providing an estimate for the indexing operation.

4. Click Index to start indexing.

### Depot Path tab

To perform indexing on all changes in a depot path, in the Depot Path tab:

1. Enter the depot path you want to index.

2. If you want to use more than one tab for your indexing request, set the other tabs before going to the next step.

3. Click Execute. A dialog appears providing an estimate for the indexing operation.

4. Click Index to start indexing.

### User tab

To perform indexing for a specific user, in the User tab:

1. Enter the name of the P4 Server user.

2. If you want to use more than one tab for your indexing request, set the other tabs before going to the next step.

3. Click Execute. A dialog appears providing an estimate for the indexing operation.

4. Click Index to start indexing.

Your search for returned results