Understanding how to Search for Artifacts and Packages

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

Searching for objects can be conducted through the global search field at the top of the JFrog Platform Deployment.

global-search-example.png

Note: For release bundles, Global search only searches for Release Bundles v1 (RBv1). For more information on searching for Release Bundles v2, see Understanding Release Bundles v2.

It is important to understand that each set of objects are maintained in different databases.

  • Artifact Database: When a package is uploaded to Artifactory, binary file information regarding the contents of the package is identified, Artifactory then adds that information to the Artifacts database. So the artifacts database contains information about the binary files in a package

  • Packages Database: When a package is uploaded to Artifactory, it parses all metadata related to the package, then adds that information to the package database. So the Packages database contains the metadata extracted from the relevant manifest or other metadata file when a package was uploaded. Its important to note here this data is not updated in the Artifactory database if manual changes are later made to artifacts that are part of that package

When using the Global Search and selecting on option (e.g. package, artifact), Artifactory opens the page for that item and then conducts the search in the relevant database. So for example, if you select the Packages option, Artifactory opens the Packages page and then searches in the database which hosts information that was extracted from a metadata file when a package was uploaded.

For more information on the types of objects in Artifactory, see Understanding Artifacts and Packages.

Important Note on Artifacts, Packages and Metadata

An artifact can have a different name than its underlying metadata. This usually happens, for example, when someone manually changed the name of an artifact, then re-uploaded it. In this case, the metadata in the package database extracted from the package when it was uploaded doesn't get updated. This results in a mismatch between the artifact name as it appears in the artifact database and the metadata in the package database which was recorded when the package including that artifact was uploaded to Artifactory. The mismatch can cause confusion when searching.

If using the global search and choosing Artifact, the new artifact name will be found. But if using the global search and choosing Package, and looking for the new name, the item won't be found. This is because the Package search option searches the original metadata, and hasn't recorded the change to the artifact name. For an illustration of this issue and how to best search for artifacts and packages see the video Searching for Artifacts and Packages.

The following illustrates the difference between an artifact with its original data, and one that was manually changed resulting in a mismatch between the name in the artifacts tree and its metadata.

Artifact and Metadata with Matching Names

Artifact and Metadata with Names that Don't Match

single-package-artifact-aligned-names-showing-alignment.png
single-artifact_package-misaligned_names-example.png