List Info

Thread: how to get exact result counts? also how do i config query limit properly




how to get exact result counts? also how do i config query limit properly
user name
2007-01-22 05:35:18

Hi, can you hint me if i am doing this correctly: (java code)

+++;+++3;++++++++++++++;+++++++++

SearchClient searchClient = new SearchClient("somekey";);

WebSearchRequest request = new WebSearchRequest("try this query";);
request.setResults(getResultsPerQuery); //LINE
3 "getResultsPerQuery" isa a local method reads xml configurations

WebSearchResults wsr = searchClient.webSearch(request);
WebSearchResult[] resultList = wsr.listResults();

System.out.println(resultList.size());

+++++;+++3;+++++++++++++3;++++++++

the problem is, LINE 3 limits results to be returned by each query.
if the xml says its "50", then even there are 1000 results, the
request returns "50". Should i remove that line to get unlimited and
thus "actual" result counts?

also, what exactly does "results-per-query" and "max-results-per-
query" mean? if i set

results-per-query=50,

and i download all these 50 results returned, does it cost 50
queries? Im asking because there are only 5000 queries available a
day per IP. And I wonder if "results-per-query" and "max-results-per-
query" have any impact on this 5000 quota?

Thank you!

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )