ARTIFACTORY: What does Artifactory's "Recalculate Index" option do, and how do I keep track of it

ARTIFACTORY: What does Artifactory's "Recalculate Index" option do, and how do I keep track of it

Products
Frog_Artifactory
Content Type
User_Guide
AuthorFullName__c
Fadi Rouhana, Kanishk Sharma
articleNumber
000005641
FirstPublishedDate
2023-03-21T13:38:06Z
lastModifiedDate
2025-07-20
VersionNumber
8
Repositories Index in Artifactory:

In Artifactory, once the repository type is set, the system will index artifacts and calculate the corresponding metadata for every package uploaded, which optimizes performance when resolving artifacts. 

That being said, Artifactory Generic repositories do not maintain separate package indexes because they are not specific to any package type. For more information, see Generic Repositories

The Repository Layout configuration in each repository sets the layout that the repository should use for storing and identifying modules. Hence, the layout that corresponds to the package type defined will be used to index packages uploaded that match the selected layout and calculate the metadata accordingly.

Recalculating a Repository Index:

Based on the package type of the repository, calculates or recalculates the metadata for the corresponding repository.
You can trigger an asynchronous reindexing of a local repository either through the UI or using the REST API.
Through the UI, select the corresponding repository in the Tree Browser and select Recalculate Index from the right-click menu, as shown below (requires Admin privileges).

 

To reindex a repository through the REST API, please refer to Artifactory REST API for more information:
How do I keep track of the Artifactory Index calculation?

The progress of the repository index calculation can be monitored using the following files: $JFROG_HOME/artifactory/var/log/artifactory-service.log in Artifactory 7, or $JFROG_HOME/​​artifactory/logs/artifactory.log in Artifactory 6.

For example, a local NPM repository's index recalculation triggered via the UI is demonstrated by the following entries in the logs:
 2023-03-09T20:24:54.905Z [jfrt ] [INFO ] [d78a21769b8474d ] [t.a.RecalculateIndexService:63] [http-nio-8081-exec-4] - Recalculating index for repository test-npm-local scheduled to run
2023-03-09T20:24:54.908Z [jfrt ] [INFO ] [47857f39ce42fb09] [o.a.a.n.NpmServiceImpl:245    ] [e42fb09|art-exec-512] - Npm metadata recalculation has been started for path 'test-npm-local:'
2023-03-09T20:24:54.912Z [jfrt ] [INFO ] [47857f39ce42fb09] [o.a.a.n.NpmServiceImpl:252    ] [e42fb09|art-exec-512] - Recursively reindexing npm packages under 'test-npm-local:'.
2023-03-09T20:24:54.953Z [jfrt ] [INFO ] [47857f39ce42fb09] [o.a.a.n.NpmServiceImpl:258    ] [e42fb09|art-exec-512] - Finished npm metadata recalculation for repo 'test-npm-local' in 42.51 millis
2023-03-09T20:24:55.030Z [jfrt ] [INFO ] [7683ac19157d93c4] [.NpmPackageMetadataIndexer:407] [57d93c4|art-exec-513] - Preparing to write npm package metadata for repo 'test-npm-local' on path '.npm/jquery-json-diff/package.json'
2023-03-09T20:24:55.040Z [jfrt ] [INFO ] [7683ac19157d93c4] [.NpmPackageMetadataIndexer:417] [57d93c4|art-exec-513] - Finished writing npm package metadata for repo 'test-npm-local' on path '.npm/jquery-json-diff/package.json'
 
Indexing is resource intensive

Calculating and indexing for a repository may be a resource-intensive operation, especially for a large local repository or if the repository is a virtual one containing other underlying repositories.
Therefore, we recommend that you do not include repositories that do not require indexing for a periodic index calculation