While performing SOSL for one character I got exception "search term must be longer than one character", with more than one characters query is working fine.

Is there any document from Salesforce which specify minimum character length.


I cant find documentation for the minimum search length in a SOSL query. Testing in Dev console I found that is set in 2 chars.

Seems logical, when you use global search on SFDC, you get a error message if your search pattern has less than 2 chars (Your search term must have 2 or more characters.)

For less than 2 chars the option is using SOQL.

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.