คำถาม Total number of search results

  • 5 กุมภาพันธ์ 2555 16:11
     
     

    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.

ตอบทั้งหมด

  • 8 กุมภาพันธ์ 2555 13:08
     
     
    Could anyone please help me!!?
  • 13 กุมภาพันธ์ 2555 21:29
     
     

    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,


    • แก้ไขโดย TomDiscuss 13 กุมภาพันธ์ 2555 21:31
    •