function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
THUNDER CLOUDTHUNDER CLOUD 

Can we fetch 10000 records using SOSL query?

Using SOSL query we can fetch 2000 records, but can fetch 10000 records using SOSL query? If not possible then is there any other way  to do so? 
Tim BarsottiTim Barsotti

Thunder, what's the use case here? 

SOQL limits the return to 50k. I'd opt for SOQL if you need more than 2k records - but the cross object searching is not an option with a single query. 

Another option, is to run multiple SOSLs. For example, if you are searching Contacts and Accounts, instead of 1 SOSL for both objects, you could run 1 SOSL per object and then display the results after all the queries. 

THUNDER CLOUDTHUNDER CLOUD
Hi Tim,
Thanks. 
This question was only for knowledge purpose.