Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
Total number of search results

Unanswered 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 PM
     
     
    Could 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=10

    So 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
    •