[Developers] Cursor:false isn't returned as expected

Will Moffat will at hamstersoup.com
Fri Nov 2 20:32:46 UTC 2007


Hi,

Can somebody shed light on this? According to the MQL API doc, you
should pass a cursor until the cursor in the response is false:
http://www.freebase.com/view/9202a8c04000641f800000000544e139#cursors

I expect result 1 to return cursor:false (since there are only 6
matches) but since it returns a cursor I make another query. This
seems to return corrupt results. (Will Moffat is included twice)
Only result 3 has cursor set to false.

Is this a bug?


My queries:

1)
http://www.freebase.com/api/service/mqlread?queries={"c0":{"query":[{"id":null,"limit":30,"my_full_name~=":"will","my_full_name":null,"type":"/freebase/user_profile"}],"escape":false,"cursor":true}}

2)
http://www.freebase.com/api/service/mqlread?queries={"c0":{"query":[{"id":null,"limit":30,"my_full_name~=":"will","my_full_name":null,"type":"/freebase/user_profile"}],"escape":false,"cursor":"eNqFjltOw0AMRRcDkTJCUW1n7LEthLqV6bShkVpSpYVuv0wfAr64nz7XV6d8zsdp9g1Y8vyx9ifozAxFCZy8HY_Zf112m-H02rXXYiLRJL0-KNb-13jwClg1VUASQX0e37enFyOgrAUiAEjEQeGeyIyGQ_eGUUK73efbxt_xwzTt_DzNaydhNenJG8DGuFlZUyCE8CNLymQP2aqEiRNzj3fYw39Kt5RvpfoJyUJYPC-WgJEQBQgwr7AQCl4ALkpO8g=="}}

3)
http://www.freebase.com/api/service/mqlread?queries={"c0":{"query":[{"id":null,"limit":30,"my_full_name~=":"will","my_full_name":null,"type":"/freebase/user_profile"}],"escape":false,"cursor":"eNqFjtFOwzAMRT8GKjVC1WwndmwLIX4lzSirNOjUDfh9CNsEPHEffa6vTn1bj8vqZIReXrd-A4OZoSiBk_fzsfivy_5pOt0P_Xcxk2iWqFeKrf8-H7wBVs0NkCRQX-fn3enOCKhohQQAknBSuCQxo-E0PGCS0O9eynnj7_hhWfb-saxbJ2E1ieQdYGfcjdZVCCH8yJIy2VW2KWHmzBzxAiP8p3RO_VJqn5AthM3t5jHVNCIKEBSII1GET6HJTrw="}}


The results:

1)

{
  "status": "200 OK",
  "c0": {
    "cursor": "eNqFjltOw0AMRRcDkTJCUW1n7LEthLqV6bShkVpSpYVuv0wfAr64nz7XV6d8zsdp9g1Y8vyx9ifozAxFCZy8HY_Zf112m-H02rXXYiLRJL0-KNb-13jwClg1VUASQX0e37enFyOgrAUiAEjEQeGeyIyGQ_eGUUK73efbxt_xwzTt_DzNaydhNenJG8DGuFlZUyCE8CNLymQP2aqEiRNzj3fYw39Kt5RvpfoJyUJYPC-WgJEQBQgwr7AQCl4ALkpO8g==",
    "code": "/api/status/ok",
    "result": [
      {
        "my_full_name": "Will Fitzgerald",
        "type": "/freebase/user_profile",
        "id": "/user/willf"
      },
      {
        "my_full_name": "Will Moffat",
        "type": "/freebase/user_profile",
        "id": "/user/willmoffat"
      },
      {
        "my_full_name": "Will Luo",
        "type": "/freebase/user_profile",
        "id": "/user/will"
      },
      {
        "my_full_name": "Will Clayton",
        "type": "/freebase/user_profile",
        "id": "/user/willclayton"
      },
      {
        "my_full_name": "Will",
        "type": "/freebase/user_profile",
        "id": "/user/motiveet"
      },
      {
        "my_full_name": "Will Larson",
        "type": "/freebase/user_profile",
        "id": "/user/lethain"
      }
    ]
  },
  "code": "/api/status/ok"
}




2)

{
  "status": "200 OK",
  "c0": {
    "cursor": "eNqFjtFOwzAMRT8GKjVC1WwndmwLIX4lzSirNOjUDfh9CNsEPHEffa6vTn1bj8vqZIReXrd-A4OZoSiBk_fzsfivy_5pOt0P_Xcxk2iWqFeKrf8-H7wBVs0NkCRQX-fn3enOCKhohQQAknBSuCQxo-E0PGCS0O9eynnj7_hhWfb-saxbJ2E1ieQdYGfcjdZVCCH8yJIy2VW2KWHmzBzxAiP8p3RO_VJqn5AthM3t5jHVNCIKEBSII1GET6HJTrw=",
    "code": "/api/status/ok",
    "result": [
      {
        "my_full_name": "Will Fitzgerald",
        "type": "/freebase/user_profile",
        "id": "/user/willf"
      },
      {
        "my_full_name": "Will Moffat",
        "type": "/freebase/user_profile",
        "id": "/user/willmoffat"
      },
      {
        "my_full_name": "Will Moffat",
        "type": "/freebase/user_profile",
        "id": "/user/willmoffat"
      },
      {
        "my_full_name": "Will Luo",
        "type": "/freebase/user_profile",
        "id": "/user/will"
      },
      {
        "my_full_name": "Will Clayton",
        "type": "/freebase/user_profile",
        "id": "/user/willclayton"
      },
      {
        "my_full_name": "Will",
        "type": "/freebase/user_profile",
        "id": "/user/motiveet"
      },
      {
        "my_full_name": "Will Larson",
        "type": "/freebase/user_profile",
        "id": "/user/lethain"
      }
    ]
  },
  "code": "/api/status/ok"
}


3)

{
  "status": "200 OK",
  "c0": {
    "cursor": false,
    "code": "/api/status/ok",
    "result": []
  },
  "code": "/api/status/ok"
}


More information about the Developers mailing list