I am trying to make a list of searchable messages stored in firebase, so I have firebse db like this
{
"post": {
"postId": {
"title": "bla bla bla",
"date": "1/1/2015"
},
"postId2": {
"title": "bla bla bla",
"date": "2/1/2015"
}
}}
Now I want to filter by name, just publish that their name begins with "bla bla", and then pager and sort by date, so I made this code:
var posts=new Firebase(URL + "/post");
posts=posts.orderByChild("title").startAt("bla bla").endAt("bla bla"+"z");
posts=posts.orderByChild("date").startAt(10).limitToFirst(10);
posts.on("value", function (raw_data) {
});
each of the requests works, but when I add them, I get an error message
Query.orderByChild: you cannot combine multiple orderBy calls.
How can i do this? I prefer not to use my own server and copy data to my server and do it there
source
share