Helix TeamHub supports code searching for Git repositories. The code is indexed from each repository's default branch. You can configure the default branch for each repository from the repository settings view.
Code search can be performed on the following levels:
- Company level (all Git repositories within the company)
- Project level (all Git repositories within one or multiple projects)
- Repository level (one or multiple Git repositories)
Enabling code search
Only user with company administrator privileges can enable code search.
Note: on-premise customers will first need to setup and configure Elasticsearch to their Helix TeamHub instance. Refer to the administrator's guide on how to achieve this. If you require further assistance, please don't hesitate to contact support.
To enable code search:
Access the Company Settings view using the user dropdown list in the header or from the My Dashboard tab.
In the Features tab, turn on Code Search and click Save.
Once code search is enabled, TeamHub indexes all Git repositories within the company. Depending on the amount of data to process, the indexing operation might take a while. You can monitor the current progress on the My Dashboard tab. When done, the indicator on the right displays Indexing complete.
You can begin a code search from any view. To search the code:
- Click the search icon in the site header.
In the search field, enter your search term and press Enter.
TeamHub displays the search results in a separate view.
By default, TeamHub displays only the matching code lines.
To view the full search context, click the arrow icon beneath the result.
To see more results, use the pagination controls at the bottom of the page.
You can narrow down search results by specifying which projects and repositories to include.
Helix TeamHub applies the following filters automatically based on the view from which you invoke the search:
- Browsing a project sets the current project as the filter.
- Browsing repository views or the project's wiki set the repository as the filter.
You can clear these filters in the results view.
Invoking a search from the company scope does not set any filters. Instead, TeamHub searches within all projects and repositories to which you have access.
In addition to the project and repository filters, you can define whether to include or omit results from forked repositories using the dropdown list on the right.
The numbers next to the filters indicate the number of results for each project and repository. Note that by selecting a project, you are effectively searching in all repositories within that project. To restrict the search to specific repositories, first remove the project filter.
If you have multiple repositories with the same name in several projects, you can narrow down the search using the following syntax:
project:repository. For example, to search repositories starting with
bat in a project called
Amazing, enter the following string in the search field:
To view a project's identifier, go to the Projects tab or move your pointer over the project name.