Total number of search results
-
Sunday, 5 February, 2012 4:11 PM
Hello,
I'm trying a simple keyword based query on publications with "Data Mining" for e.g. Now I know that I can fetch only 100 result objects with each call, how ever how can I know the total number of search results available (for the query string), so that I can loop till that (total) number to get all results/publications related to "Data Mining"?
I have read the API manual, but in all examples you are setting StartIdx=1 and EndIdx=1 Or 10. I tried not setting these parameters, but that did not work either.
Thanks.
All Replies
-
Wednesday, 8 February, 2012 1:08 PMCould anyone please help me!!?
-
Monday, 13 February, 2012 9:29 PM
Hi,
For any search I do, I get a JSON response back with the TotalItem count:
Example -
http://academic.research.microsoft.com/json.svc/search?AppId=YOURAPPID&FullTextQuery=
data+mining&ResultObjects=Publication&PublicationContent=AllInfo&StartIdx=1&EndIdx=10So I would think that adjusting the start and end index wuold allow all results to be obtained.
Returns
{
"d": {
"__type": "Response:http:\/\/research.microsoft.com",
"Author": null,
"Conference": null,
"Domain": null,
"Journal": null,
"Keyword": null,
"Organization": null,
"Publication": {
"__type": "PublicationResponse:http:\/\/research.microsoft.com",
"EndIdx": 10,
"StartIdx": 1,
"TotalItem": 53079,
- Edited by TomDiscuss Monday, 13 February, 2012 9:31 PM