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
miha198206miha198206 

Pagination for SOSL query

Hi,

 

Is it possible to make a SOSL query to retrieve more than 200 records? How can I make a paging to retrieve the records in small batched using SOSL?

 

Thank you.

Mikhail

NashalNashal

Hi,

 

You can get the solution for your doubts here : http://blog.jeffdouglas.com/2009/07/14/visualforce-page-with-pagination/

 

 

 

 

 

 

Anup JadhavAnup Jadhav

Is it possible to make a SOSL query to retrieve more than 200 records?

No, it's not possible to query more than 200 records in a SOSL query.

 


How can I make a paging to retrieve the records in small batched using SOSL?

There are 2 options for you - server side paging or client side paging. If you are expecting more than 200 records to be retrieved then you'd have to implement server side paging. This involves keeping track of the record in your controller, and then pushing that data to the UI when requested (i.e. when the user clicks on Next Page or Previous page).

 

Client side paging involves pushing all of the data on page/section load, and then manipulating the UI via javascript to display/hide the data. If your data is within limits (<= 200 records), then you can employ either strategy depending on your design requirements.

 

Thanks,

Anup

SRKSRK

now in spring release a new varable is come offset in query check that

miha198206miha198206

It seems like OFFSET is available for SOQL query only. I need have a paging with SOSL queries

miha198206miha198206

Nashal wrote:

Hi,

 

You can get the solution for your doubts here : http://blog.jeffdouglas.com/2009/07/14/visualforce-page-with-pagination/

 

 

 

 

 

 


This article for SOQL queries. How can I use the same approach for SOSL queries. Can you give me an example of code?

NiranjaNiranja

Hi,

 

Did anyone find a solution to handle more than 200 records through SOSL queries ?

 

Thanks in advance.

Lila GiuiliLila Giuili
OFFSET is now available for SOSL queries. Learn more here (https://developer.salesforce.com/docs/atlas.en-us.192.0.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_offset.htm).

Plus, the 200 record limit has also been significantly increased. Find more information at SOSL Limits (https://developer.salesforce.com/docs/atlas.en-us.192.0.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_limits.htm).