5

My SOSL query with an extremely long search expression failed with

System.UnexpectedException: Search Term exceeded max length

Searching the Documentation I could not find anything about a max length. Do you know of such and do you know its value?

5

20,000 characters as of the Summer '13 release.

https://na1.salesforce.com/help/doc/en/salesforce_app_limits_cheatsheet.pdf - page 37

The SOSL statement character limit is tied to the SOQL statement character limit defined for your organization. By default, SOQL and SOSL queries cannot exceed 20,000 characters.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.