June 29, 2010
When using any of the searchers available in the Search API, four results are returned by default. Historically, it has been possible to request a large set of eight results (or ten for filter Custom Search Engines), but that’s it. We understand that there are many use cases for this API, and some of them require a finer grain of control over the number of results displayed.
.setResultSetSize(6) in addition to using the enum to request a
LARGE_RESULTSET. When using the RESTful interface, you can also use any integer from 1 to 8 with the
With this addition, you can now request an arbitrary number of results, based on the exact number you need. By requesting only the results you’re going to show to the end-user, you can make your site or app more efficient. Also, this will control the cursor values that can be used to retrieve subsequent pages of results (and impact paging in the Custom Search element).
For more details, check out the documentation, and if you have any questions, stop by our IRC channel and support forum.