No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
SOSL Syntax
The SOSL query syntax consists of a required FIND clause followed by one or more optional clauses in the following order:
1FIND {SearchQuery} [ toLabel()]
2[ IN SearchGroup [ convertCurrency(Amount)] ]
3[ RETURNING FieldSpec ]
4[ WITH DivisionFilter ]
5[ WITH DATA CATEGORY DataCategorySpec ]
6[ WITH NETWORK NetworkIdSpec ]
7[ LIMIT n ]
8[ UPDATE TRACKING ]
9[ UPDATE VIEWSTAT ]where:
| Syntax | Description |
|---|---|
| FIND {SearchQuery} | Required. Specifies the text (words or phrases) to search for.
The search query must be delimited with curly braces. If the SearchQuery string is longer than 10,000 characters, no result rows are returned. If SearchQuery is longer than 4,000 characters, any logical operators are removed. For example, the AND operator in a statement with a SearchQuery that’s 4,001 characters will default to the OR operator, which could return more results than expected. |
| toLabel() | Optional. Results from a query are returned translated into the user’s language. |
| IN SearchGroup | Optional. Scope of fields to search. One of the following values:
|
| convertCurrency(Amount) | Optional. If an organization is multicurrency enabled, converts currency fields to the user's currency. |
| RETURNING FieldSpec | Optional. Information to return in the search result. List of one or more objects and, within each object, list of one or more fields, with optional values to filter against. If unspecified, then the search results contain the IDs of all objects found. |
| WITH DivisionFilter | Optional. If an organization uses divisions, filters all search results based on values for the Division field. |
| WITH DATA CATEGORY DataCategorySpec | Optional. If an organization uses Salesforce Knowledge articles or answers, filters all search results based on one or more data categories. |
| WITH NETWORK NetworkIdSpec | Optional. Filters search results by community ID. |
| LIMIT n | Optional. Specifies the maximum number of rows returned in the text query, up to 2,000. If unspecified, the default is 2,000, the largest number of rows that can be returned. These limits apply to API version 28.0 and later. Previous versions support a maximum of 200 rows returned. |
| UPDATE TRACKING | Optional. If an organization uses Salesforce Knowledge, tracks keywords used in Salesforce Knowledge article search. |
| UPDATE VIEWSTAT | Optional. If an organization uses Salesforce Knowledge, updates an article’s view statistics. |