[Developers] using offset / cursor in a mqlread query

Arthur van Hoff AVH at zing.net
Tue Aug 19 14:55:08 UTC 2008


Hi Rishav,

 

You need to add "cursor":true, to the query envelope. You will then get
the first 10 answers, as well as the cursor for the next set of results,
which looks like this:  "cursor":
"eNorzi8qsSo2MbfyTSwuSS1SSMxLUXDOz80F0qlFVgohGakKbolFCsGZKakK-WkKJUB-eH5
RTkq6pZGBUaJFsoGJgYGBmYlhmoUBFBilGZsbGCQDADJgGwk=". The last set of
results will contain "cursor":false.

 

{

    "cursor": true,

    "query":  [{

        "name~=": "^Master*",

        "type": "/music/album",

        "name": null,

        "limit": 10,

        "sort": "name"

    }]

}

 

Have fun,

 

    Arthur van Hoff

 

From: developers-bounces at freebase.com
[mailto:developers-bounces at freebase.com] On Behalf Of Rishav Rastogi
Sent: Tuesday, August 19, 2008 2:25 AM
To: developers at freebase.com
Subject: [Developers] using offset / cursor in a mqlread query

 

Hi,
I have tried to introduce offset/ limit in a mqlread query but have been
unable to so

the query i run is

{
 "query" :[ {
                 "name" : null,
                  "name~=": "^Master*",
                  "limit" : 10,
                  "sort" : "name",
                  "type" : "/music/album"
               }]
}

Can somebody tell me how to introduce concept of a offset in this type
of query ( with a example please) I have tried using Cursor as well, 

but i get the same kind of error as I do with offset keyword ( that
offset is a reserved word / cursor is a reserved word)


Thanks

Rishav



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080819/303c9643/attachment-0001.htm 


More information about the Developers mailing list