---
schema_version: "1"
id: f9d28f609147450a2c80f3311173d3ef37d70d01c31952d667d4c3ef9c297ab8
title: Refine Search With Wildcards and Operators
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/search_with_wildcards_operators.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.search_with_wildcards_operators.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6802807d28e5ee9d3cd8aaf4ae8fcec88b7e0e728eb442673df4d0f6f75ebf42
description: Get more control over your search results by using wildcards and operators in your searches. Using wildcards and operators in your searches can ensure you’re seeing all applicable records in your search results. Learn how to use them and their limitations.
products:
  - Cross Cloud
release: "264"
---
# Refine Search With Wildcards and Operators

Get more control over your search results by using wildcards and operators in your searches. Using wildcards and operators in your searches can ensure you’re seeing all applicable records in your search results. Learn how to use them and their limitations.

**Wildcards**

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:20%">
          <col style="width:80%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d43389e44">Wildcard</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d43389e47">Usage</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Wildcard" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e44 ">Asterisk (*)</td>

            <td data-label="Usage" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e47 ">
              <p>Use an asterisk to find items that match zero or more characters in the middle
                or at the end of your query. The more specific your terms the more relevant the
                results. For example, to find all items for the singular and plural of the term
                prospect, enter <kbd>prospect*</kbd>. Avoid using partial terms like
                prosp because you can get unintended matches such as results for the term
                prosperity.</p>
              <p>To find a literal asterisk (*) inside a phrase, enclose the string
                between quotation marks and precede the special character with a backward slash
                (\). The backward slash is an escape character.</p>
              <p>Examples:</p>
              <ul>
                <li>To find items that start with john, such as, john, johnson, or johnny, enter
                  <kbd>john*</kbd>.
                </li>

                <li>To find items with mike meyers or michael meyers, enter <kbd>mi*
                    meyers</kbd>.</li>

                <li>To find the phrase "contact is john*", enter <kbd>contact is
                    john\*</kbd>.</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Wildcard" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e44 ">Question mark (?)</td>

            <td data-label="Usage" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e47 ">
              <p>Use a question mark to match only one character in the middle or at end of your
                query. You can't use a question mark in a lookup search. To find a literal question
                mark (?) inside a phrase, enclose the string between quotation marks and precede the
                special character with a backward slash (\). The backward slash is an escape
                character.</p>
              <p>Examples</p>
              <ul>
                <li>To find items with the term john or joan but not jon or johan, enter
                  <kbd>jo?n</kbd>.
                </li>

                <li>To find the phrase where is john? enter <kbd>where is
                    john\?</kbd>.</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

**Operators**

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:20%">
          <col style="width:80%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d43389e136">Operator</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d43389e139">Usage</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Operator" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e136 ">AND</td>

            <td data-label="Usage" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e139 ">
              <p>Use AND to find items that match all the search terms. </p>
              <p>Example: To find
                items with the words john and smith, enter <kbd>john AND smith
                </kbd>.</p>
              <p style="margin-bottom:0;">If an operator isn't specified, AND is the default operator
                except for documents and solutions. When searching for those items, you must
                specify AND because OR is the default operator. For Knowledge search, if only a
                few records are returned with AND as the default operator, it switches to using
                the OR operator.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Operator" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e136 ">AND NOT</td>

            <td data-label="Usage" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e139 ">
              <p>Use AND NOT to find items that don’t contain the search term. </p>
              <p style="margin-bottom:0;">Example: To
                find items with the word john but not smith, enter <kbd>john AND NOT
                  smith</kbd>.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Operator" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e136 ">OR</td>

            <td data-label="Usage" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e139 ">
              <p>User OR to find items with at least one of the search terms. </p>
              <p style="margin-bottom:0;">Example: To
                find items with only john or john and smith, enter <kbd>john OR
                  smith</kbd>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Operator" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e136 ">Parentheses ( )</td>

            <td data-label="Usage" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e139 ">
              <p>Use parentheses to group search terms with logical operators. </p>
              <p>Examples:</p>
              <ul>
                <li>To find Bob Jones or Sally Smith, enter <kbd>("Bob" and "Jones") OR
                    ("Sally" and "Smith")</kbd>.</li>
                <li>To find Bob Jones and Sally Smith or Bob Thomas and Sally Smith, enter
                  <kbd>("Bob") and ("Jones" OR "Thomas") and Sally Smith</kbd>
                </li>
              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Operator" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e136 ">Quotation marks (” “)</td>

            <td data-label="Usage" class="slds-cell-wrap" style="vertical-align:top;" headers="d43389e139 ">Use quotation marks around search terms to find matches in the order you enter
              your terms. A search for "monday meeting" finds items that contain monday meeting
              but not meeting monday. Search doesn’t look for an exact match for your terms. If
              you enter the term "John Smith" you can also get results for John Doe Smith. If you
              use quotation marks, spelling correction, nicknames, and synonyms aren’t applied. To
              include the words <kbd>and</kbd>, <kbd>or</kbd>, and
              <kbd>not</kbd> in your search results, surround those words in double
              quotes. Otherwise they’re treated as operators.
            </td>

          </tr>
        </tbody>
      </table>

When you combine operators in a search string, they’re evaluated in the order Parenthesis, AND and AND NOT (in order from right to left), OR.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-search-264-0-0-production-enus/6a28c936-3b68-4186-bc09-7ab905f33ef3/images/icon_note.png)

Note A search query with multiple wildcards or operators can time out and fail. When timeouts occur, remove some wildcards or operators and run the query again.