Searching

The Search functionality of Archiva allows a user to search for specific artifact references in the repository.

What Can Be Searched?

The repository files that are indexed during repository scan can be configured in the Repository Scanning page, in the Repository Scanning - File Types section (indexable-content). By default, the indexable-content file types are:

**/*.txt
**/*.TXT
**/*.block
**/*.config
**/*.pom
**/*.xml
**/*.xsd
**/*.dtd
**/*.tld

The contents of all the files in the repository that matches the above configuration will be indexed during repository scan. So when you type a word in the search box, Archiva will search the index for that query string and return all the search hits in the form of a list of artifacts. For example you typed in 'classworlds', the search result would contain the list of artifacts that use or reference 'classworlds'.

Below is a sample screenshot of the search results:

Search Results

When the user clicks a specific artifact in the search results list, Archiva will direct the user in the Artifact Info page (the same page from the Repository Browse). Otherwise if it is not a pom file (ex. metadata.xml), the file will appear as a file to be downloaded from the browser.

Security

The Search functionality respects the repository permissions. If the user is not logged in to Archiva and does a search, only those repositories with guest permissions will be searched for the query string. And if the user is logged in to Archiva and does a search, only those repositories in which that user has permission to access will be searched for the query string.