Loading

Wildcards and operators for search

Publiseringsdato: Sep 23, 2024
Beskrivelse


Get even more control over your search results with wildcards and operators. Here's how to use them and some of their limitations:


Løsning

How to use search wildcards

 

  • Use an asterisk (*) to find items that match zero or more characters at the middle or end of your query.

  • Use a question mark (?) to find items that match only one character at the middle or end of your query.


Use more specific search terms to get more relevant results. For example, to find all occurrences of prospect, including the plural prospects, use "prospect*". Using a partial term like "prosp*" could return unintended matches, like matches for "prosperity". Search terms that are too general may also take longer to return results. For more details see the 'Wildcards' section of the FIND {SearchQuery} | SOQL and SOSL Reference documentation.


Wildcard limitations

 

  • Leading wildcards (used at the beginning of a search term) are not supported, with the exception of standard lookups in the Classic interface.

  • Asterisks and question marks used within a search phrase enclosed in quotation marks (or when the exact phrase is selected in the search scope) function as wildcards. For example, "fo?d" matches to "food" and "fold."

  • Queries with wildcards are inherently less performant than standard queries, and expected results may not be returned if a query is too resource intensive. A number of factors can contribute to this behavior, including the size of the index being searched. If an expected record isn't returned, try searching with a unique value from the record without wildcards to confirm that the record is returned.


How to use search operators

 

  • AND - search for items that match all of the search terms.

  • AND NOT - search for items that don't contain the search term.

  • OR - search for items containing at least one of the search terms.

  • Parenthesis - group search terms together (grouped search terms are evaluated before other terms in your string).

  • Quotation marks - search for items that match all of the search terms in the order entered.

 

Multiple combined operators in a search string are evaluated in the following order:
 

1. Parenthesis

2. AND or AND NOT (in order from right to left)

3. OR

 

 
    Knowledge-artikkelnummer

    000387524

     
    Laster
    Salesforce Help | Article