Search across your code base, work items, or wiki

Azure DevOps Services | Azure DevOps Server 2019 | TFS 2018 | TFS 2017

With the search box, you can quickly find a code file, work item, or wiki page.

With the search box, you can quickly find a code file or work item.

Code search requires installation of the Code Search extension. If it hasn't yet been installed, request that a member of your Project Collection Administrators group install it.

To start your search, choose Repos>Files or other page under Code, enter a keyword or phrase in the search box, and press Enter or choose the  start search icon.

Code Search box

  1. In the search box, check that the text displays Search code. If it doesn't, use the selector to select it.

    Switching between searching for code and work items

  2. Enter a search string in the text box, and press Enter (or choose the start search icon icon) to start your search.

Work with code search results

  1. The search page shows a list of the matching code files. The selected file has all instances of the search string highlighted. If you see a list of work items, ensure that Code is selected in the top left.

    Code search results example

  2. Try assembling more complex search strings using the operators and functions listed in the handy drop-down list. Select the filter function or code type you want to include in your search string from the list, and type the criteria value.

    Code search bar

    • You can find all instances of "ToDo" comments in your code simply by selecting comment: and typing todo.

    • You can search in specific locations, such as within a particular path, by using a search string such as Driver path:MyShuttle/Server.

    • You can search for files by name, such as Driver file:GreenCabs.cs, or just by file extension. For example, the search string error ext:resx could be useful when you want to review all error strings in your code. But even if your plain text search string (without specific file type functions) matches part of a filename, the file appears in the list of found files.

    • You can combine two or more words by using Boolean operators; for example, validate OR release.

    • You can find an exact match to a set of words by enclosing your search terms in double-quotes. For example, "Client not found".

    • You can use the code type search functions with files written in C#, C, C++, Java, and Visual Basic.NET.

To learn more, see Search code.

  1. Choose any Boards page, enter a keyword or phrase in the search box, and press Enter or choose the  start search icon.

    Work Item Search box

  2. Search results are displayed in a snippet view where the matches found are shown in bold.

    Search results

    This is a full text search that uses simple search strings for words or phrases. Work item search matches derived forms of your search terms; for example, a search for "updating" will also find instances of the word "updated" and "update". Note that searches are not case-sensitive.

  3. Select a snippet of a work item to display it in the right window.

    Open the search results in a new browser tab from a search box by pressing Ctrl + Enter or by holding Ctrl and clicking the start search icon icon. In Google Chrome, press Ctrl + Shift + Enter to switch the focus to the new browser tab.

  1. In the search box, check that the text says Search work items. If it doesn't, use the selector to select it.

    The Work Item Search textbox in the title bar

  2. Enter a search string in the text box, and press Enter (or choose the start search icon icon) to start your search.

  3. Search results are displayed in a snippet view where the matches found are shown in bold.

    Search results

    This is a full text search that uses simple search strings for words or phrases. Work item search matches derived forms of your search terms; for example, a search for "updating" will also find instances of the word "updated" and "update". Note that searches are not case-sensitive.

  4. Select a snippet of a work item to display it in the right window.

    Open the search results in a new browser tab from a search box by pressing Ctrl + Enter or by holding Ctrl and clicking the start search icon icon. In Google Chrome, press Ctrl + Shift + Enter to switch the focus to the new browser tab.

Fine tune your work item search results

  1. Fine tune your search by specifying the fields to search. Enter a: and a user name to search for all items assigned to that user.

    Search from the title bar

    The quick filters you can use are:

    • a: for Assigned to:
    • c: for Created by:
    • s: for State
    • t: for Work item type

  2. Start typing the name of a field in your work items; for example, type ta.

    Quick filters as you type

    The dropdown list shows work item field name suggestions that match user input thereby helping the user to complete the search faster. For example, a search such as tags:Critical finds all work items tagged 'Critical'.

  3. Add more filters to further narrow your search, and use Boolean operators to combine terms if required. For example, a: Chris t: Bug s: Active finds all active bugs assigned to a user named Chris.

  4. Narrow your search to specific types and states, by using the drop-down selector lists at the top of the results page.

  1. Fine tune your search by specifying the fields to search. Enter a: and a user name to search for all items assigned to that user.

    Search from the title bar

    The quick filters you can use are:

    • a: for Assigned to:
    • c: for Created by:
    • s: for State
    • t: for Work item type

  2. Start typing the name of a field in your work items; for example, type ta.

    Quick filters as you type

    The dropdown list shows work item field name suggestions that match user input thereby helping the user to complete the search faster. For example, a search such as tags:Critical finds all work items tagged 'Critical'.

  3. Add more filters to further narrow your search, and use Boolean operators to combine terms if required. For example, a: Chris t: Bug s: Active finds all active bugs assigned to a user named Chris.

  4. Narrow your search to specific types and states, by using the drop-down selector lists at the top of the results page.

To learn more, see Search work items

With wiki search, you can search within a project wiki or across all wikis created for the organization. Simply select the Search wiki option from the search box and type a keyword or phrase within the search box.

Note

Wiki search is supported on TFS 2018.2 or later versions. To download TFS 2018.2, see Team Foundation Server 2018 Update 2 Release Notes.

Choose Overview>Wiki and type your keyword or phrase into the search box.

Wiki search option

The search feature quickly returns wiki pages by title or page content. English language stemming support helps you find the most relevant wiki pages. For example, when you enter request in the search box, wiki search will return page results containing related words such as requesting, requested, requests, and so on.

Wiki search results

Open Wiki and type your keyword or phrase into the search box.

Wiki search option, previous navigation

The search feature quickly returns wiki pages by title or page content. English language stemming support helps you find the most relevant wiki pages. For example, when you enter request in the search box, wiki search will return page results containing related words such as requesting, requested, requests, and so on.

Wiki search results