How to set the number of results returned in Local Search?

3 views
Skip to first unread message

Luting

unread,
Apr 17, 2008, 2:56:55 PM4/17/08
to Google AJAX API
Hi, I am using Local Search API and I want the API to return as many
results as possible. But it seems when I add the LocalSearch component
to my page, the default setting is to return the first 4 results. And
when I expand it by clicking on the button set, the number of results
could be expanded to 8.

Is there any way to set the default results as 8, without any manual
expanding operation?

Also, is there any way to remove the "8" limitation and let the
LocalSearch return more results than 8?

Thank you!

jgeerdes [AJAX APIs "Guru"]

unread,
Apr 17, 2008, 3:02:48 PM4/17/08
to Google AJAX API
If you read the documentation, you'll find that you can retrieve 8
results by using searcher.setResultSetSize(GSearch.LARGE_RESULTSET);
and then using a searcherOptions object to set expand mode to open.
You will also find in the documentation that 8 is the largest
resultset that you can return from the local search portion of the
API. You can check out the documentation for more details on this:

http://code.google.com/apis/ajaxsearch/documentation/

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
jgee...@mchsi.com

If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!
Reply all
Reply to author
Forward
0 new messages