1

I am trying SOSL for first time and have some questions related to limits. As per document http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_sosl_limit.htm It says, maximum no of records that can be returned in one query is 2000.

My question is:

  1. Is this limit on per query or per API call. If I understand correctly, per query limit means no matter what I can not retrieve more than 2000 results for same search string while per API call limit means that search might have returned more than 2000 records but in one API call, I can retrieve only 2000 records. To get more records, I would have to make more API calls, something like 'SearchResult.hasMoreRecords' and get next set of search result records, though I see that com.sforce.soap.enterprise.SearchResult does not have any hasMoreRecords function or any function to get next set of results.

  2. What does Total number of SOSL queries issued: 20 mean? It's mentioned in www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm. Is it per day/per hour?

Any pointers to help me clarify this would be appreciated.

Thanks

3
  1. There's no equivalent of queryMore for sosl, you can get 2000 records max total per search term, there's no paging through additional results.

  2. As the doc says "These limits count for each Apex transaction." so per request, not an aggregate per hour/day limit.

  • Got the first point. That seems to be a limitation though. For the second point, I am using Soap API in Java and don't know what an Apex transaction is. Is this limit valid for me as well? – RandomQuestion Dec 26 '13 at 23:40
  • Also I am using 'enterprise' wsdl for this. I also see that same set of classes are generated by partner wsdl as well. Am I using the correct wsdl? – RandomQuestion Dec 26 '13 at 23:43
  • 1
    the apex limits don't apply to soap requests (unless its a soap request that calls apex), but soap calls to search don't invoke any of the apex limits. – superfell Dec 26 '13 at 23:45
  • Create another question if you have a different question about WSDLs – superfell Dec 26 '13 at 23:45
  • thanks superfell. posted another question salesforce.stackexchange.com/questions/23086/… – RandomQuestion Dec 27 '13 at 0:05

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.