Find Work Items Based on Keywords or Phrases

You can perform partial or exact match queries on a keyword or a phrase contained within any text field. Or, you can perform a full-text search query by filtering on keywords and phrases contained within the full-text search index. Team Foundation automatically indexes all long-text fields with a data type of PlainText and HTML and the Title field for full-text search.

Requirements

  • You must be a member of the Readers group or have the View work items in this node permission set to Allow. For more information about query permissions, see Find Bugs, Tasks, and Other Work Items.

Find a work item based on keywords or phrases

You can use the search box to find work items that match a keyword or phrase contained within these fields: Description, Repro Steps, and Title. To find work items that partially or exactly match the words or phrase that you enter, you must use the Query Editor and the Contains operator.

Note

Specify Contains or Does Not Contain to search against exact or partial matches of a word or phrase. Specify Contains Words or Does Not Contain Words to search against an exact phrase or to use the wildcard character, *. These operators use the full-text search index. For restrictions, see Full-text searches for server and collation requirements.

To use the search box to find work items by keyword or phrase

  1. In the Search work items box, type a keyword or phrase that appears in the Title, Description, or Repro Steps fields for the work items of interest.

    Enclose multiple words in quotation marks.

    For example, to find work items with the specified keywords in the Title or Description fields:

    • For the keyword "duplication", enter duplication.

    • For the phrase "Getting Started", enter "Getting Started".

    • For the phrase "Getting Started" or the keyword "feature", enter feature "Getting Started"

  2. Choose the search icon Search or Search icon (Team Explorer).

    Note

    You can construct more advanced searches by using field information, operators, and variables. For more information see Work Item Search Syntax.

To use the Query Editor and Contains or Contains Words find work items based on keyword or phrase

  1. Open a New Query.

    A new Flat List of Work Items (Default) query opens.

  2. Specify the keyword or phases for your filter criteria. Specify Contains or Does Not Contain to search against exact or partial matches of a word or phrase. Specify Contains Words or Does Not Contain Words to search against an exact phrase, or when you want to use the wildcard character, *.

    For example, construct the following set of clauses:

    And/Or

    Field

    Operator

    Value

      

    Team Project

    =

    @Project

    And

    Title

    Contains

    keyword

    Or

    Title

    Contains

    phrase

    Or

    Description

    Contains

    keyword

    Or

    Description

    Contains Words

    phrase

  3. Select the four clauses that contain the Title and Description fields, and then choose Group Query Clause (Group Clause).

  4. Choose Run Query (Team Explorer)Run Query, check the results, and adjust the filter criteria as needed.

    The query will return work items whose title or description fields contain the keyword or phrase that you specified.

    For more information, see Specify Query Filter Criteria.

See Also

Concepts

Work Item Search Syntax

Query Fields, Operators, Values, and Variables

Find Bugs, Tasks, and Other Work Items