Reputation: 3
I got an error when I try to get a Apigee collection using this code:
var my_pc_list = new Apigee.Collection( { "client":client, "type":"pc_pedidos", qs :{ql:"limit:50"} });
This is the error:
{"error":"query_parse","timestamp":1401301444160,"duration":0,"exception":"org.apache.usergrid.persistence.exceptions.QueryParseException","error_description":"The query cannot be parsed. The token 'limit' at column 0 on line 1 cannot be parsed"}
I need to increase the default limit for displaying entities, I need to show more than 10 entities.
Thanks
Upvotes: 0
Views: 134
Reputation: 531
The problem is with this part:
qs: {ql:"limit:50"}
you want this:
qs:{limit:50}
There is no need to use ql (which stands for query language) because the limit statement falls outside of the ql. For example, you might make a call like this:
GET /users?ql=select * where somevalue=1&limit=50
Notice that the limit statement is not part of the query (its not part of the ql).
If you do want to run a query in addition to the limit, like the GET /users call above, that would look like this:
qs:{ql:"select * where somevalue=1", limit:50}
Where the qs (query string) is an object made up of the key value pairs you want to go into the query string of the call that is made.
Upvotes: 1