Newer Version Available
SOSL Limits
- The search engine looks for matches to the search term across a maximum of 2,000 records (this limit starts with API version 28.0).
- SOSL applies different limits for a given object or situation. If the search is for a single object, the full record limit is applied. If the search is global across multiple objects, each object has individual limits that total 2,000 records.
- Admins (users with the View All Data permission) see the full set of results returned.
- For all other users, SOSL applies user permission filters. Individual users see only those records that they have access to. Results sets and order vary by the user issuing the search and can change throughout the day as records are added or removed from the index.

Example
Because Joe used a global search, limits are applied to each object type to make up the 2,000 record limit. The illustration shows five blue raindrops going into the filter, but only three make it to the next stage. If Joe limited his search to just one object, the limit would apply to only that object, increasing the chance that the record he wanted would be returned.
Joe retries his search by typing Industrial Computing San Francisco. With a more specific search term, the search engine is able to return better matches, even with the same limits applied. In this scenario, the record Joe’s looking for is one of the blue raindrops that makes it from the top of the filter all the way through to Joe’s search results page.
To avoid search crowding and truncation:
- Encourage users to use more specific search terms
- Searches work best when users enter a unique search term. Acme Company San Francisco returns more relevant results than Acme.
- Encourage users to narrow the search scope
- When users are on the search results page, limit the search scope to the object type for the record desired. The search is rerun. Potentially, users could see more results, because the full result set limit is applied against a single object.
- Create list views
- Create a list view for a specific set of contacts, documents, or other object records that you search for repeatedly. List views have no limits to the number of records and have a set order. Sharing rules are also applied.
SOSL Limits for External Objects
- To include an external object in SOSL and Salesforce searches, enable search on both the external object and the external data source. However, syncing always overwrites the external object’s search status to match the search status of the external data source.
- Only text, text area, and long text area fields on external objects can be searched. If an external object has no searchable fields, searches on that object return no records.
- External objects don’t support the following.
- INCLUDES operator
- LIKE operator
- EXCLUDES operator
- toLabel() function
- External objects also don’t support Salesforce Knowledge-specific clauses,
including the following.
- UPDATE TRACKING clause
- UPDATE VIEWSTAT clause
- WITH DATA CATEGORY clause
- External
objects must be specified explicitly in a RETURNING clause to be returned in search results. For
example:
1FIND {MyProspect} RETURNING MyExternalObject, MyOtherExternalObject
- The OData adapters for Salesforce Connect don’t support logical operators in a FIND clause. We send the entire search query string to the external system as a case-sensitive single phrase after removing all ASCII punctuation characters except hyphens (-). For example, FIND {MyProspect OR “John Smith”} searches for the exact phrase “MyProspect OR John Smith”.
- The convertCurrency() function isn’t supported in SOSL queries of external objects.
- WITH clauses aren’t supported in SOSL queries of external objects.